Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/adr/0043-avoid-elasticsearch-on-critical-reads.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,6 @@ PRIMARY KEY mailboxId
CLUSTERING COLUMN messageId
COLUMN sentAt
COLUMN receivedAt
```
```

Note that to handle position & limit, we need to fetch `position + limit` ordered items then removing `position` firsts items.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so if I scroll quickly n times, I will generate 1+2+...+n = n*(n+1)/2 cassandra requests ~= O(n²)

that's pretty bad, no? Couldn't it be a cause of ElasticSearch slowness? Could it slow down Cassandra?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True for Cassandra.

True for ElasticSearch.

JMAP includes some limits concurent call, rate limiting - that can help mitigating these concenrs in the future.

Couldn't it be a cause of ElasticSearch slowness?

Maybe for some.

I succeeded to clearly link some to reindexing as well thanks to @tuanlc .