fix(sync): re-pull from zero before pushing after a refused cursor, and drop purged deletes - #380
Merged
kYem merged 12 commits intoOct 4, 2026
Conversation
…nd drop purged deletes Fixes ENG-127
…a same-account re-auth
…istings past the watermark
… restore detection
kYem
deleted the
kes/eng-127-sync-runcycle-pushes-in-the-same-cycle-as-a-resync_required
branch
October 4, 2026 01:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes ENG-127
runCyclere-pulls fromsince=0before pushing. If that is refused too, the push still runs, since compare-and-set keeps it off newer rows.resync_required(the cursor is behind the purge watermark): the client deletes the synced entities its full listing no longer finds (dropPurged).cursor_ahead(the cursor is pastlast_seq, so the database was restored): the client re-pushes what the restore lost (repushLost).GET /v1/changesalso:listing=full) past the watermark, so accounts over 500 rows can finish a full listing;Deploy the API before releasing the clients. A client on the old server keeps its cursor on re-auth but gets no restore detection.
Known limits:
PULL_PAGEand the server's page size must stay equal.