Skip to content
  • Krzysztof Nowicki's avatar
    Don't merge collection sync queue items originating from different places · 4bb1d6ab
    Krzysztof Nowicki authored and Laurent Montel's avatar Laurent Montel committed
    
    
    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>
    4bb1d6ab