Repository navigation
fix(azure): tolerate legacy membership writers during rolling upgrades - #11622
Merged
ReubenBond merged 3 commits intoOct 29, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The mixed-version compatibility path permits torn membership snapshots despite IMembershipTable's atomic-read contract, requiring maintainer confirmation of a safety trade-off whose runtime consequences are not covered by the added tests.
No open issues 🎉
What changed in this PR
Restores Azure Table membership progress during rolling upgrades by tolerating legacy writers that advance the canonical version without updating boundary markers.
Changes:
- Accepts snapshots when the canonical version is numerically strictly ahead of both markers, while preserving retries for other mismatches.
- Adds regression coverage for pagination, numeric ordering, malformed versions, and subsequent boundary-aware writes.
| File | Description |
|---|---|
| test/Extensions/Orleans.Azure.Tests/AzureMembershipPaginationTests.cs | Tests legacy snapshot acceptance, rejection cases, and boundary-marker advancement. |
| src/Azure/Orleans.Clustering.AzureStorage/OrleansSiloInstanceManager.cs | Adds the mixed-version acceptance rule and documents its legacy snapshot semantics. |
Review effort: Balanced
This was referenced Oct 29, 2026
Ubuntu 26.04 no longer provides libxml2.so.2 required by dotnet-coverage. Keep coverage-enabled Linux tests on the compatible image while preserving apt-independent prerequisite checks. Fixes dotnet#11623.
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.

Problem
During a rolling upgrade, an Orleans 10.0.0 silo advances the canonical Azure Table
VersionRowwithout updating the!Startand~Endboundary markers installed by a newer silo. The newer reader requires all three versions to match, so subsequent reads exhaust five attempts and throwInconsistentStateException, preventing membership progress.Solution
Restore the mixed-version acceptance rule used by Orleans 10.3.x: accept a snapshot when the canonical membership version is numerically strictly ahead of both boundary versions. Preserve the authoritative version, ETag, and membership rows so the next boundary-aware membership write atomically advances all three version rows. Other mismatches and partial marker pairs retain bounded retries.
Mixed-version reads retain legacy snapshot semantics, including potentially torn paginated snapshots while legacy writers remain active. Boundary-aware writes continue to establish the ordered snapshot fence.
Regression coverage
Reproduce the reported five-attempt exception with legacy writers, then verify single-page and paginated acceptance, numeric ordering, strict comparison boundaries, malformed versions, and a subsequent boundary-aware write advancing the canonical version and both markers. The focused Azure membership pagination suite passes all 97 cases.
CI prerequisite
Pin coverage-enabled Linux test jobs to Ubuntu 24.04, which supplies the
libxml2.so.2dependency required by the pinned coverage collector. The Ubuntu 26.04 rollout otherwise prevents tests from starting. Preserve the existing prerequisite check and apt-independent setup. Fixes #11623.10.x backport: #11624.
Microsoft Reviewers: Open in CodeFlow