Close containers when self-join predates loaded state - #8
Open
alexvy86 wants to merge 1 commit into
Open
Conversation
Capture an immutable sequence baseline for each write connection and close when its matching ClientJoin predates loaded state. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c450f833-25aa-4d46-90c8-7527b0377cbd
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.
Description
A newly assigned write connection cannot safely join at or before the immutable sequence state the client knew before processing that connection. Previously, DeltaManager treated such a self-join as ordinary duplicate delivery, leaving the container in
CatchingUpuntilNoJoinOp.This change captures an immutable sequence baseline for each connection before its initial messages are enqueued. A matching
ClientJoinat or below that baseline now closes the container immediately with a non-retryablefileOverwrittenInStorageerror. The check runs before duplicate filtering, while valid self-join overlap, joins for other clients, and duplicate delivery after later operations remain unchanged.Connections established before
attachOpHandlerdefer baseline initialization until snapshot or pending-state sequence tracking is available. Disconnect and reconnect replace the baseline and client ID. Telemetry records only safe sequence and connection metadata, including PR 28148's raw pre-normalization checkpoint when available.AB#82433
Reviewer Guidance
The review process is outlined in the pull request guidelines.
This PR is stacked on PR 28148. Review the changes relative to its
alexvy86-fix-service-checkpoint-regressionbranch. After PR 28148 merges, this PR will be rebased and retargeted tomain.The focused tests cover the stale self-join failure, valid self-joins, harmless duplicate delivery, other-client overlap, connection-before-attach ordering, reconnect baseline replacement, and error telemetry.