[
https://issues.apache.org/jira/browse/JAMES-3561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17318976#comment-17318976
]
Benoit Tellier commented on JAMES-3561:
---------------------------------------
Hello Daniel,
This, is by design. Let me explain.
Email/query relies on ElasticSearch search index. Updating the index for
obvious performance reasons is done asynchronously by ElasticSearch. Resulting
in the experience you describe. Updating the index synchronously would lead to
'order of magnitude' performance slow down and harm the overall experience for
real deployments.
And the mailbox is backed by an event but to conduct secondary work (like
updating the index) in a reliable, distributed fashion. But its distributed
implementation is also asynchronous. You will notice that state changes on
*/set are asynchronous as well.
Maybe we should better document this behaviour in the annotated documentation...
> Email/query immediately after Email/set (mailbox move) does not reflect change
> ------------------------------------------------------------------------------
>
> Key: JAMES-3561
> URL: https://issues.apache.org/jira/browse/JAMES-3561
> Project: James Server
> Issue Type: Bug
> Components: JMAP
> Affects Versions: master
> Reporter: Daniel Gultsch
> Assignee: Antoine Duprat
> Priority: Major
>
> Steps to reproduce:
> 1) Query emails in Inbox
> 2) Move one of the emails Trash. Await result of that operation
> 3) Query emails in Inbox again
>
> Expected result:
> The second query should not contain the email we just moved to Trash.
>
> Actual result:
>
> It does. Only another query a few seconds later does not contain the email in
> question.
>
> I’m currently using ElasticSearch but enabling view.email.query.enabled did
> not improve the situation. (I had the assumption that ElasticSearch index
> updates are not synchronous.)
>
> Full requests/responses are here:
> https://gist.github.com/iNPUTmice/84e5ca91d994f73871ee67eaa2c58587
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]