Skip to content
Commit 4bb1d6ab authored by Krzysztof Nowicki's avatar Krzysztof Nowicki Committed by Laurent Montel
Browse files

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: default avatarKrzysztof Nowicki <krissn@op.pl>
parent 5471a823
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment