Wait for changes from resource to be written to Akonadi before marking change as processed
This fixes a problem with invalid RIDs after inter-resource moves. When there is an another changeReplay for the just moved item scheduled in the new parent resource, the item will have invalid RID (or rather RID assigned to it by the previous parent resource). It's because the ItemModifyJob dispatched from ResourceBase::changesCommitted() with the new RID is not finished yet when the next task is dispatched, and so the item in resource's EntityCache is not invalidated and the resource will use it instead of the updated one. By waiting for the ItemModifyJob dispatched from changesCommited() to finish before marking the change as processed and dispatching next task we make sure that in case the next task involves the same item the change will be stored in Akonadi and the item will be invalidated in local caches, forcing the resource to fetch the item again from Akonadi before starting the task. This fixes 'Invalid uidset' error reported by IMAP resources after the MailDispatcher agent moves the mail from local Outbox to remote Sent folder and updates it's flags. BUG: 323762 BUG: 324807 CCBUG: 314964 FIXED-IN: 4.11.3
parent
05312786
Please register or sign in to comment