| Summary: | Deleting several thousand mails at once only deletes them in the local store | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] Akonadi | Reporter: | Andreas Schneider <asn> |
| Component: | IMAP resource | Assignee: | Christian Mollekopf <chrigi_1> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | dvratil, pim-bugs-null, vkrause |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | http://commits.kde.org/kdepim-runtime/6cc5af5b150628a250e67b12ee1ee195a0d8859c | Version Fixed/Implemented In: | 4.14.2 |
| Sentry Crash Report: | |||
|
Description
Andreas Schneider
2014-10-01 09:56:53 UTC
Git commit 6b8101c42bf96c54499da7aea61f1b70904fc450 by Dan Vrátil. Committed on 03/10/2014 at 09:08. Pushed by dvratil into branch 'KDE/4.14'. [IMAP Resource] Remove RemoveItemsTask and use ChangeItemsFlagsTask instead Removing emails means appending the \Deleted flag, so RemoteItemsTask is just a simpler version of ChangeItemsFlagsTask with hardocded flag to append. To avoid code duplication and make use of flags-related fixes in ChangeItemsFlagsTask, we can just use that instead of RemoveItemsTask. REVIEW: 120447 M +0 -1 resources/imap/CMakeLists.txt M +2 -2 resources/imap/imapresourcebase.cpp D +0 -106 resources/imap/removeitemstask.cpp D +0 -46 resources/imap/removeitemstask.h M +0 -1 resources/imap/tests/CMakeLists.txt D +0 -105 resources/imap/tests/testremoveitemstask.cpp http://commits.kde.org/kdepim-runtime/6b8101c42bf96c54499da7aea61f1b70904fc450 Git commit 6cc5af5b150628a250e67b12ee1ee195a0d8859c by Dan Vrátil. Committed on 03/10/2014 at 09:13. Pushed by dvratil into branch 'KDE/4.14'. [IMAP Resource] Split large UID STORE commands to multiple smaller ones Although not specified in RFC, IMAP servers usually have some limit on maximal length of a command send by clients. This is best visible in case of ChangeItemsFlagsTask, which would create an insanely long STORE command when user marked as read thousands of emails at once. To prevent servers from rejecting our requests, we split large STORE requests to multiple smaller ones, each of 2000 UIDs at most. 2000 sounds like a good compromise between not hitting it too often (i.e. users usually mark as read few emails at once, hundreds at best) and not hitting the server-side limits (every server out there should handle 2000 UIDs in a request). This number can be tuned later of course if we find out it's too much/not enough. REVIEW: 120446 FIXED-IN: 4.14.2 M +23 -9 resources/imap/changeitemsflagstask.cpp M +3 -0 resources/imap/changeitemsflagstask.h http://commits.kde.org/kdepim-runtime/6cc5af5b150628a250e67b12ee1ee195a0d8859c |