Repository navigation
fix(azure): upgrade legacy membership boundary rows safely - #11594
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the change enabling legacy Azure Table membership upgrades.
No open issues 🎉
What changed in this PR
Fixes direct upgrades from Orleans 10.2.x by allowing Azure Table clustering to safely initialize missing membership boundary markers before publishing a snapshot.
Changes:
- Atomically adds both missing markers and refreshes the version ETag without changing membership data or its version.
- Rereads through the consistency fence after migration or contention; continues rejecting partitions with only one marker.
- Adds deterministic and Azurite regression tests for legacy partitions, stale tokens, membership progression, storage failures, and cancellation.
| File | Description |
|---|---|
| test/Extensions/Orleans.Azure.Tests/AzureMembershipTableTests.cs | Tests legacy upgrades with zero, one, and 1,001 silo rows, including token rejection and Joining-to-Active progression. |
| test/Extensions/Orleans.Azure.Tests/AzureMembershipPaginationTests.cs | Tests migration transactions, fenced rereads, contention, failures, cancellation, and partial markers. |
| src/Azure/Orleans.Clustering.AzureStorage/OrleansSiloInstanceManager.cs | Initializes absent legacy boundary markers atomically and requires a fenced reread. |
Review effort: Balanced
Contributor
Code coverage
Report-only conclusion: current-main baseline stale. The newest successful coverage run tested 1ea0875, not current main f4a07ad. Coverage combines every CI test matrix job, including providers, CodeGen, .NET 8/10, Linux, Windows, and macOS, using canonical physical source and branch identities. The comparison remains report-only while normal line and branch variance is calibrated. Coverage details |
ReubenBond
force-pushed
the
rb-azure-membership-upgrade
branch
from
October 27, 2026 21:22
9fd511c to
f036c9b
Compare
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.
Fixes #11571.
Azure Table membership partitions last written by Orleans 10.2.x contain VersionRow and silo records but acquire the ordered !Start/~End markers only after a newer membership write. Requiring those markers on the initial read prevented silos from joining after a direct upgrade.
Keep CanAcceptSnapshot synchronous and accept the legacy case where both boundary markers are absent. Legacy reads preserve the stored membership version, ETags, and silo rows. The first successful versioned membership write already atomically establishes both markers alongside VersionRow and the silo mutation; subsequent reads use the existing marker/version consistency checks. A partial boundary pair can result from a query overlapping that first write, so retry partial pairs through the existing bounded snapshot loop. A persistently partial or mismatched pair fails with cluster/table context after the retry bound.
Add Azurite regression cases seeded directly with 10.2.x-format partitions (zero, one, and 1,001 silo rows), including unchanged legacy reads, first-write marker installation, stale-token rejection, and Joining-to-Active progression. Deterministic cases cover single-page/paginated legacy reads, torn-read recovery, and persistent partial markers; existing tests retain atomic-write and mismatched-fence coverage.
The companion audit of #11307, #11317, #11342, and #11387 found no additional provider with this legacy-format startup dependency. ADO.NET retains its existing schema and required query keys; enhanced cleanup is optional. Firestore and ZooKeeper keep their existing persisted formats.
10.x backport: #11596.
Microsoft Reviewers: Open in CodeFlow