Bug 61869

Summary: FolderSync when ActiveSync server loses state
Product: SyncEvolution Reporter: Graham Cobb <g+syncevolution>
Component: ActiveSyncAssignee: SyncEvolution Community <syncevolution-issues>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: medium CC: dwmw2, syncevolution-issues
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Add eas_connection_forget_folders
Hack to always fetch folder list from scratch
ignore "file not found" when deleting key file

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 1.3.99.3.
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.