Bug 61869 - FolderSync when ActiveSync server loses state
Summary: FolderSync when ActiveSync server loses state
Alias: None
Product: SyncEvolution
Classification: Unclassified
Component: ActiveSync (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: SyncEvolution Community
QA Contact:
Depends on:
Reported: 2013-03-05 18:04 UTC by Graham Cobb
Modified: 2018-10-13 12:45 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:

Add eas_connection_forget_folders (2.14 KB, patch)
2013-03-05 18:05 UTC, Graham Cobb
Details | Splinter Review
Hack to always fetch folder list from scratch (1.53 KB, patch)
2013-03-05 18:06 UTC, Graham Cobb
Details | Splinter Review
ignore "file not found" when deleting key file (1.12 KB, patch)
2013-03-07 18:50 UTC, Patrick Ohly
Details | Splinter Review

Description Graham Cobb 2013-03-05 18:04:12 UTC
On occasion, the ActiveSync server loses state and insists that the client refetches the folder list with folder sync key 0.  Currently there is no way for the user to fix that, except finding the folder cache file and deleting it.

The attached patches add a hack to handle this case and allow folder syncs to recover.  The hack is that folder syncs **always** restart from sync key 0.  This means that when the problem occurs, the user can recover by forcing a folder sync (for example using --print-databases).

There are two patches.  The first patch, 0001-eas-daemon-add-eas_connection_forget_folders.patch, is not a hack.  This adds the capability to reset the folder sync, which is required in any solution to the problem.

The second patch, 0001-eas-daemon-workround-folder-sync-when-server-loses-s.patch, is the hack.  This always calls eas_connection_forget_folders before doing a folder sync.  This could be optimised further in future if desired.
Comment 1 Graham Cobb 2013-03-05 18:05:54 UTC
Created attachment 75976 [details] [review]
Add eas_connection_forget_folders

This patch is not the hack -- it is needed for any solution to the problem
Comment 2 Graham Cobb 2013-03-05 18:06:51 UTC
Created attachment 75977 [details] [review]
Hack to always fetch folder list from scratch
Comment 3 Patrick Ohly 2013-03-06 10:29:32 UTC
I have included these patches in a for-master/folder-sync-hack branch, which means that SyncEvolution will include them when building activesyncd binaries and source archives.

As discussed on the mailing list ("[SyncEvolution] Activesync server losing state"
 http://thread.gmane.org/gmane.comp.mobile.syncevolution/4295), a better solution would be to detect the issue and do the sync with key 0 automatically if and only if needed.

I'll keep the issue open with no particular assignee.
Comment 4 Patrick Ohly 2013-03-07 18:50:34 UTC
Created attachment 76128 [details] [review]
ignore "file not found" when deleting key file

Setting up an account in a clean environment with these two patches applied failed in the regular testing with a "Error removing file: No such file or directory".

The fix was simple... ;-) It's part of the for-master branch and I'll use it in SyncEvolution
Comment 5 GitLab Migration User 2018-10-13 12:45:49 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/SyncEvolution/syncevolution/issues/157.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.