Dont interrupt sync for unrelated checkpoint #239
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.
This restores support for interrupting checkpoints (the functionality was disabled in #236 due to a flaw where new checkpoints on unrelated bucket would interrupt sync).
To restore this functionality, we're expanding the work we're doing while the previous sync iteration is active: Instead of just waiting for a new checkpoint from storage, we're also building the new checkpoint line preemptively. If the new checkpoint does not result in a
checkpoint
line for the connection, we do nothing and keep waiting for the next checkpoint.This should be safe because the stateful logic to build checkpoint lines does not update its internal state if no line ends up being built.