mozilla-services/android-sync — comment on commit db2de0f8434be941663bbf5857bfbe7467200499
File: src/main/java/org/mozilla/gecko/sync/stage/SyncClientsEngineStage.java line 178
By rnewman:

If the upload fails, we won't try again. I suggest you define a sentinel value for the server client record timestamp, which will persist across syncs: set the timestamp to -1 here, and *don't* update the timestamp if it's -1 and we aren't in the upload handler.

That is:

* Process commands. Set timestamp to -1.
* We fail to upload. Timestamp is still -1. Sync aborts.
* New sync. We download our client record; it still has commands. (Hmm, process or not?)
* We *do not* fast forward our upload timestamp, because the local one is -1.
* In shouldUpload, we decide to upload.
* In the success handler, fast-forward the timestamp as usual.

Alternative: if we fail to re-upload, and we were re-uploading because of commands, do we need to do this? We'll always re-upload after commands, right?

Argue with me!