View Issue Details

IDProjectCategoryView StatusLast Update
0002492SOGoBackend Calendarpublic2014-05-02 17:38
ReporterMarten Gajda Assigned Toludovic  
Status resolvedResolutionfixed 
Product Version2.1.0 
Target Version2.2.4Fixed in Version2.2.4 
Summary0002492: sync-token changes with every request if nothing has changed in a collection

Sending a sync-collection report to a collection (calendar or addressbook) that has not been changed returns an different sync token every time the request has been sent.

The sync-token is meant to reflect changes and it should not change without a change in the collection.

Steps To Reproduce

Sending this request

<?xml version="1.0" encoding="utf-8" ?>
<D:sync-collection xmlns:D="DAV:">
<D:getcontenttype />
<D:getetag />
<D:displayname />

to three times in series returned these results:

<D:multistatus xmlns:D="DAV:"><D:sync-token>1384192108</D:sync-token></D:multistatus>[

<D:multistatus xmlns:D="DAV:"><D:sync-token>1384192109</D:sync-token></D:multistatus>

<D:multistatus xmlns:D="DAV:"><D:sync-token>1384192110</D:sync-token></D:multistatus>

Additional Information

If the response actually contains changes, the returned sync token is always the same (when sending the same request multiple times), just like it should be.

TagsNo tags attached.




2013-11-11 17:58

administrator   ~0006212

You shouldn't use sogo-demo for such tests as lots (read hundreds of BILLIONS!) of users are doing random crap at the same time.

I've just tried it on my local installation and it works as expected.

Marten Gajda

Marten Gajda

2013-11-12 10:24

reporter   ~0006220

Sorry, I have to reopen this.
As you can see, the three subsequent requests didn't contain any changes (i.e. no response tag), but the sync-token changed (I've sent the same sync-token with all three requests). That should not happen.
The sync token should not change if there was no change in the collection. In that case the server should return the same token that was sent with the request.
The sync-token should behave like the ctag in that case. Actually, it's the successor of the ctag. It has the same meaning in terms of indicating changes in a collection, just with the extended functionality to get the actual changes.

I was able to reproduce this with a non-public SOGo installation running 2.0.7. Initially the issue has been reported by a user.



2014-05-01 20:16

administrator   ~0006987

Can you try this patch?

--- a/SoObjects/SOGo/SOGoGCSFolder.m
+++ b/SoObjects/SOGo/SOGoGCSFolder.m
@@ -1,9 +1,7 @@
/ SOGoGCSFolder.m - this file is part of SOGo

  • Copyright (C) 2004-2005 SKYRIX Software AG
      • Copyright (C) 2006-2012 Inverse inc.
    • *
      • Author: Wolfgang Sourdeau <>
      • Copyright (C) 2006-2014 Inverse inc.
  • This file is free software; you can redistribute it and/or modify
  • it under the terms of the GNU General Public License as published by
    @@ -1358,11 +1356,15 @@ static NSArray *childRecordFields = nil;

    NSZoneFree (NULL, selectors);


    • /* If we haven't gotten any result to return, let's use the previously
    • supplied sync-token */
    • if (max == 0)
    • newToken = syncToken;
      / If the most recent c_lastmodified is "now", we need to return "now - 1"
      in order to make sure during the next sync that every records that might
      get added at the same moment are not lost.
    • if (!newToken || newToken == now)
    • else if (!newToken || newToken == now)
      newToken = now - 1;

    newTokenStr = [NSString stringWithFormat: @"%d", newToken];



2014-05-02 17:38

administrator   ~0006988


Issue History

Date Modified Username Field Change
2013-11-11 17:52 Marten Gajda New Issue
2013-11-11 17:58 ludovic Note Added: 0006212
2013-11-11 17:58 ludovic Status new => closed
2013-11-11 17:58 ludovic Assigned To => ludovic
2013-11-11 17:58 ludovic Resolution open => no change required
2013-11-12 10:24 Marten Gajda Note Added: 0006220
2013-11-12 10:24 Marten Gajda Status closed => feedback
2013-11-12 10:24 Marten Gajda Resolution no change required => reopened
2014-05-01 20:16 ludovic Note Added: 0006987
2014-05-01 20:17 ludovic Target Version => 2.2.4
2014-05-02 17:38 ludovic Note Added: 0006988
2014-05-02 17:38 ludovic Status feedback => resolved
2014-05-02 17:38 ludovic Fixed in Version => 2.2.4
2014-05-02 17:38 ludovic Resolution reopened => fixed