chibenwa opened a new pull request #629:
URL: https://github.com/apache/james-project/pull/629


   ### Actual behaviour
   
   ```
   GIVEN Samsung Email mobile application
   AND connected to an IMAP account located on an IMAP James server
   AND load you emails (swap down if needed)
   WHEN Refresh your emails (swap down a second time)
   THEN the email account is rendered empty, only emails received since are 
displayed
   ```
   
   Another refresh restores the original email list....
   
   ### Explanation
   
   The second refresh uses QRESYNC SELECT command with the last known 
modification sequence modifier.
   
   Thus James needs to compute the vanished responses (messages deletes since 
the last known modseq).
   
   As James do not store expunges, we should interate the supplied range and 
identify the missing items, for which we will send vanished responses.
   
   But James specifically filters out old messages from the liveness search, 
which results in all messages prior to the last known modification sequence to 
be considered deleted, effectively removing them from client cahe.
   
   ### The fix
   
   Remove this buggy modseq condition: we should not answer that all old 
messages are deleted!
   
   h3. Implication of the fix
   
   This effectively in a full scan of the mailbox on each refresh which is very 
expensive in terms of performance.
   
   Note that tests had been manually performed. I'l try to write some!
   
   ### Alternative
   
   We could add a projection table tracking expunged messages - along with the 
modseq.
   
   However we should store all the history of deletions - otherwize some values 
as last known modseq would be rejected, and no client behaviour is specified in 
the spec if so.
   
   Also storing even more data have a bitter-sweat taste to me...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to