View Issue Details

IDProjectCategoryView StatusLast Update
0005957SOGoBackend Address Bookpublic2024-04-20 16:59
Reportermstilkerich Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
PlatformServerOSDebianOS Version11
Product Version5.10.0 
Summary0005957: CardDAV sync-collection report includes cards that have not changed since passed sync-token
Description

SOGo supports incremental synchronization of addressbooks using the sync-collection report (RFC 6578). For that, the server maintains a sync-token for each addressbook collection, which can be thought of as a version of an addressbook at a specific point in time (or at a specific sync in the past - this is implementation detail of the server).

In a test case that performs several incremental changes and sync-collection reports inbetween, SOGo returns unexpected (extra) results. While this should not cause any breakage at the client, it may lead to unnecessary re-downloading of addressbook objects that have in fact not changed since the last sync.

I don't find a specific passage in RFC 6578 that would make this behavior non-compliant, but it's certainly not optimal and it should be easy for the server to return an empty result if the passed sync-token is still matching the current one.

Steps To Reproduce

At test log is attached.

The steps are:

Starting point is an empty addressbook
1) Create two cards (referred to as Card1 and Card2 in the following)
2) Issue a sync-collection report providing an empty sync-token (full sync) - SOGo returns Card1 and Card2 as expected, plus SyncToken1.
3) Issue a sync-collection report, now providing SyncToken1 retrieved in the answer to the previous sync. SOGo returns the same result as before (Card1 and Card2, plus SyncToken1), although an empty result with SyncToken1 would be ideally expected.
4) Delete Card1, create a new card (Card3)
5) Issue a sync-collection report, now providing SyncToken1 retrieved in the answer to the previous sync. SOGo returns the deletion of Card1 (expected), and changes on Card2 (not expected) and Card3 (expected), plus a new sync-token SyncToken2 (expected).

TagsNo tags attached.

Activities

mstilkerich

mstilkerich

2024-04-20 16:59

reporter  

SyncCollection_Result_NotIncremental.txt (2,668 bytes)   
RFC references RFC 6578:

 - 3.1: The client can then present that same token back to the server at some later time, and the server will return
        only those items that are new, have changed, or were deleted since that token was generated.


Step 1) Put two cards on the server
[2024-03-31 09:18:04]: [2 NFO] "PUT /SOGo/dav/mikey@dev.mike2k.de/Contacts/personal/sabre-vobject-dfb74b0d-5733-4635-bd4a-99d1c7eedf06.vcf HTTP/1.1" 201
[2024-03-31 09:18:04]: [2 NFO] "PUT /SOGo/dav/mikey@dev.mike2k.de/Contacts/personal/sabre-vobject-c682554f-32ee-4245-89e6-14ba6d8e6a71.vcf HTTP/1.1" 201




Step 2) Perform initial sync-collection with empty sync-token (full sync) - Result is boths cards just added, EXPECTED

[2024-03-31 09:18:04]: [2 NFO] "REPORT /SOGo/dav/mikey@dev.mike2k.de/Contacts/personal/ HTTP/1.1" 207  SYNC SYNCTOKEN=           => SYNCTOKEN=1711876683, [sabre-vobject-c682554f-32ee-4245-89e6-14ba6d8e6a71.vcf, sabre-vobject-dfb74b0d-5733-4635-bd4a-99d1c7eedf06.vcf]
[2024-03-31 09:18:04]: [2 NFO] "REPORT /SOGo/dav/mikey@dev.mike2k.de/Contacts/personal/ HTTP/1.1" 207  MULTIGET




Step 3) Perform incremental sync-collection with the sync-token just retrieved from the server. Result is again both
cards, NOT EXPECTED. Expectation: no changes reported.

[2024-03-31 09:18:04]: [2 NFO] "REPORT /SOGo/dav/mikey@dev.mike2k.de/Contacts/personal/ HTTP/1.1" 207  SYNC SYNCTOKEN=1711876683 => SYNCTOKEN=1711876683, [sabre-vobject-c682554f-32ee-4245-89e6-14ba6d8e6a71.vcf, sabre-vobject-dfb74b0d-5733-4635-bd4a-99d1c7eedf06.vcf]
[2024-03-31 09:18:04]: [2 NFO] "REPORT /SOGo/dav/mikey@dev.mike2k.de/Contacts/personal/ HTTP/1.1" 207  MULTIGET


Step 4) Delete one of the cards, add a new one

[2024-03-31 09:18:04]: [2 NFO] "DELETE /SOGo/dav/mikey%40dev.mike2k.de/Contacts/personal/sabre-vobject-dfb74b0d-5733-4635-bd4a-99d1c7eedf06.vcf HTTP/1.1" 204
[2024-03-31 09:18:05]: [2 NFO] "PUT /SOGo/dav/mikey@dev.mike2k.de/Contacts/personal/sabre-vobject-1b3a9af1-9556-4c31-b77a-15618166b17f.vcf HTTP/1.1" 201



Step 5) Perform incremental sync-collection with the sync-token retrieved earlier from the server. SOGo correctly
reports the deleted card, and the newly added card. But it also reports the unchanged card again.

[2024-03-31 09:18:05]: [2 NFO] "REPORT /SOGo/dav/mikey@dev.mike2k.de/Contacts/personal/ HTTP/1.1" 207  SYNC SYNCTOKEN=1711876683 => SYNCTOKEN=1711876684, [sabre-vobject-1b3a9af1-9556-4c31-b77a-15618166b17f.vcf, sabre-vobject-c682554f-32ee-4245-89e6-14ba6d8e6a71.vcf], DEL: [sabre-vobject-dfb74b0d-5733-4635-bd4a-99d1c7eedf06.vcf]
[2024-03-31 09:18:05]: [2 NFO] "REPORT /SOGo/dav/mikey@dev.mike2k.de/Contacts/personal/ HTTP/1.1" 207  MULTIGET

Issue History

Date Modified Username Field Change
2024-04-20 16:59 mstilkerich New Issue
2024-04-20 16:59 mstilkerich File Added: SyncCollection_Result_NotIncremental.txt