• Use of syncLastDateTime can cause lost changes

    By Karl Freburger 1 decade ago

    The syncLastDateTime value is set ot he time that the last sync FINISHED. It appears to be used in SyncService.executeNotesToGoogle() and executeGoogleToNotes() to determine if a change should be propogated (changes before the last sync time are ignored, probably becuase they are assumed to have already been done?).



    However, consider this sequence of events for an event E…start sync, process E, change for E comes in, sync finishes (and last sync time is set to this time). On the next sync, the change for E will be ignored because it is BEFORE the last sync time.



    Instead, the last sync time should be when the last sync STARTED, and should be set only if the sync completed. The worst that would happen is that en event would be looked at when its change was already processed in the previous sync. Much better than losing the change altogether.