Skip to content

fix(azure): upgrade legacy membership boundary rows safely - #11594

Merged
ReubenBond merged 3 commits into
dotnet:mainfrom
ReubenBond:rb-azure-membership-upgrade
Oct 27, 2026
Merged

ReubenBond merged 3 commits into
dotnet:mainfrom
ReubenBond:rb-azure-membership-upgrade

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

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

Copilot AI balanced review requested due to automatic review settings October 27, 2026 20:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the change restoring direct upgrades from legacy Azure Table membership data.

No open issues 🎉

Review effort: Balanced

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Code coverage

Metric Pull request
Lines 83.84% (120,723 / 143,984)
Branches 73.63% (36,156 / 49,102)

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
ReubenBond force-pushed the rb-azure-membership-upgrade branch from 9fd511c to f036c9b Compare October 27, 2026 21:22
Copilot AI balanced review requested due to automatic review settings October 27, 2026 21:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified in the changes restoring direct upgrades from Orleans 10.2.x for Azure Table clustering.

No open issues 🎉

Review effort: Balanced

@ReubenBond
ReubenBond merged commit 538d305 into dotnet:main Oct 27, 2026
92 checks passed
@ReubenBond
ReubenBond deleted the rb-azure-membership-upgrade branch October 27, 2026 21:51
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.

Azure Table clustering: 10.4.0 silos cannot read membership tables last written by 10.2.x ("must include both ordered boundary version rows")

2 participants