-
Notifications
You must be signed in to change notification settings - Fork 489
JAMES-4166 JMAP search: drop scroll search, use from/size pagination and collapse by messageId #2928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JAMES-4166 JMAP search: drop scroll search, use from/size pagination and collapse by messageId #2928
Conversation
…and collapse by messageId
mailbox/api/src/main/java/org/apache/james/mailbox/model/SearchOptions.java
Outdated
Show resolved
Hide resolved
...n/java/org/apache/james/mailbox/opensearch/events/OpenSearchListeningMessageSearchIndex.java
Outdated
Show resolved
Hide resolved
...tore/src/test/java/org/apache/james/mailbox/store/search/AbstractMessageSearchIndexTest.java
Outdated
Show resolved
Hide resolved
chibenwa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpicks along the way but IMO it really goes into the right direction
Arsnael
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Read it, nothing to add.
chibenwa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work !
Here are some little comments to polish it further.
I also identified some search related issues but those are to be addressed separately.
mailbox/api/src/main/java/org/apache/james/mailbox/model/SearchOptions.java
Show resolved
Hide resolved
...rc/test/java/org/apache/james/mailbox/lucene/search/LuceneMailboxMessageSearchIndexTest.java
Outdated
Show resolved
Hide resolved
...tore/src/test/java/org/apache/james/mailbox/store/search/AbstractMessageSearchIndexTest.java
Show resolved
Hide resolved
...map-rfc-8621/src/main/java/org/apache/james/jmap/mailet/ExtractMDNOriginalJMAPMessageId.java
Outdated
Show resolved
Hide resolved
server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/method/MDNParseMethod.scala
Show resolved
Hide resolved
|
For the record, we did run a james-gatling performance test to compare the scroll search (before) vs the from/size pagination (after). scroll search
from/size pagination
Email/query seems on bar with the scroll search (https://github.com/linagora/james-project-private/issues/1149), but better MAX response time (595ms vs 894ms). However, the result is not really representative: in our JMAP performance test scenario, we do Email/query on a random keyword, which should return very few results. Also, the scroll context is closed asynchronously in the current code CF Line 117 in bfc994c
This explains similar results. We imagine we would need to go > 25 rqs on emailQuery to see significant improvements. But the gains are obvious, so we won't investigate deeper in the performance test:
|
|
Failure tests are not related to this work. It seems failing on master (without the build cache). It may be related to the I am having a look. |
Actually, these failed on my Mac (notable for not being fully compatible with docker engine), but passed on my Ubuntu PC (docker engine v28.3.3). I do not understand what is going on. Will try to rerun the CI. |
…et onto the search engine
c7c30e8 to
14af0b4
Compare
|
Green build! I squashed the fixup. |


Also, modify the search API with SearchOptions and push the offset onto the search engine.