Skip to content

fix(azure): fence paginated membership reads - #10381

Merged
ReubenBond merged 8 commits into
dotnet:mainfrom
ReubenBond:reubenbond-fix-azure-membership-pagination
Aug 9, 2026
Merged

ReubenBond merged 8 commits into
dotnet:mainfrom
ReubenBond:reubenbond-fix-azure-membership-pagination

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Aug 9, 2026 •

Copy link
Copy Markdown
Member

Azure Table continuation pages are separate Query Entities requests, so flattening them can combine membership rows from different topology versions even though IMembershipTable.ReadAll requires an atomic result.

This adds !Start and ~End, whose keys sort before and after all IPv4 and IPv6 membership row keys. Membership inserts and updates atomically write the changed silo row, the legacy VersionRow, and both boundary rows in one Azure entity group transaction.

Paginated reads compare the boundary membership versions from the completed query. Matching values prove that no boundary-aware membership update committed while the pages were read, preserving the single-query non-conflict path. A mismatch retries the query up to a bounded limit before throwing InconsistentStateException.

During rolling upgrades, older silos update only VersionRow. If VersionRow is newer than both boundary versions, the reader accepts the potentially torn snapshot instead of retrying, preserving availability while the cluster transitions. Tables without boundary rows likewise retain legacy behavior and skip the atomicity check. UpdateIAmAlive and defunct-row cleanup remain intentionally outside the topology fence.

References:

Microsoft Reviewers: Open in CodeFlow

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@ReubenBond
ReubenBond force-pushed the reubenbond-fix-azure-membership-pagination branch from 4e5ce8a to 30d5c10 Compare August 9, 2026 06:02
ReubenBond and others added 7 commits August 9, 2026 11:09
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 4af578fd-af77-4035-9308-cebe5f5de307
Handle rolling upgrades with legacy writers, protect boundary rows from cleanup and gateway discovery, and reduce read-path allocations.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4af578fd-af77-4035-9308-cebe5f5de307
Rename boundary rows and pair conditional entities with their ETags in Azure table transactions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4af578fd-af77-4035-9308-cebe5f5de307
Use one bounded loop for initial and retry reads while validating each result once.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4af578fd-af77-4035-9308-cebe5f5de307
Use one boolean acceptance check for fenced, legacy, and rolling-upgrade membership snapshots.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4af578fd-af77-4035-9308-cebe5f5de307
Move pagination, boundary inspection, rolling-upgrade handling, and retry exhaustion into CanAcceptSnapshot.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4af578fd-af77-4035-9308-cebe5f5de307
Keep retry exhaustion in FindAllSiloEntries and share boundary extraction for acceptance and diagnostics.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4af578fd-af77-4035-9308-cebe5f5de307
@ReubenBond
ReubenBond merged commit fcfb2c8 into dotnet:main Aug 9, 2026
67 checks passed
@ReubenBond
ReubenBond deleted the reubenbond-fix-azure-membership-pagination branch August 9, 2026 22:11
This was referenced Aug 28, 2026
This was referenced Sep 3, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant