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

I don't think the sentinel approach is necessary if we do the decrementing loop approach you mention in a comment above. I think the following needs to occur:

* We should update the local timestamp when we download records for the reason I explained in a couple of comments down.
* In the upload error handler:
** If we have an X-Unmodified-Since failure, this means new commands were uploaded, in addition to the ones we just processed, so we need to redownload - abort sync and naturally a redownload will happen next sync
** Else any other error means we need to upload the record no matter what so keep trying in a decrementing loop

Additional Consideration - when we've processed commands and redownload them, how will we ensure not to re-appy them? Or does it not matter if we do?

I think the sentinel approach isn't super explicit so it might be a little difficult to read. Also, it makes us have to be more careful when using `getServerClientRecordTimestamp()`