Skip to content

Close containers when self-join predates loaded state - #8

Open
alexvy86 wants to merge 1 commit into
alexvy86-fix-service-checkpoint-regressionfrom
detect-stale-self-join
Open

Close containers when self-join predates loaded state#8
alexvy86 wants to merge 1 commit into
alexvy86-fix-service-checkpoint-regressionfrom
detect-stale-self-join

Conversation

@alexvy86

@alexvy86 alexvy86 commented Sep 3, 2026

Copy link
Copy Markdown
Owner

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 CatchingUp until NoJoinOp.

This change captures an immutable sequence baseline for each connection before its initial messages are enqueued. A matching ClientJoin at or below that baseline now closes the container immediately with a non-retryable fileOverwrittenInStorage error. 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 attachOpHandler defer 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-regression branch. After PR 28148 merges, this PR will be rebased and retargeted to main.

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.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant