Don't merge collection sync queue items originating from different places
The aim of the overal idea of merging queued collection sync request
was to reduce the number of synchronization calls. These can be
long-lasting operations, which could queue-up quickly. Merging them
allows to reduce the effect of long sync queues.
The original implementation however took merging a step too far, as it
merged requests based on the collection id, regardless of their
origin, which currently can be either an explicit sync
request (ResourceBase::retrieveItems) or a background sync due to
server-side subscription trigger. This could lead to a scenario, where
the Akonadi-triggered sync would be merged away when encountering a
queued subscription sync. This would cause the start handler not to be
called resulting in a broken resource state machine (no call to
itemsRetrieved()).
Fix this by adding the type of sync request to the merge criteria.
Signed-off-by:
Krzysztof Nowicki <krissn@op.pl>
Please register or sign in to comment