Skip to content

fix(azure): tolerate legacy membership writers during rolling upgrades - #11622

Merged
ReubenBond merged 3 commits into
dotnet:mainfrom
ReubenBond:rb-fix-azure-membership-snapshots
Oct 29, 2026
Merged

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

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Problem

During a rolling upgrade, an Orleans 10.0.0 silo advances the canonical Azure Table VersionRow without updating the !Start and ~End boundary markers installed by a newer silo. The newer reader requires all three versions to match, so subsequent reads exhaust five attempts and throw InconsistentStateException, 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.2 dependency 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

Copilot AI balanced review requested due to automatic review settings October 29, 2026 18:25

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.

🔵 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

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.
Copilot AI balanced review requested due to automatic review settings October 29, 2026 18:31

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.

🟡 Changes recommended

The Linux runner change leaves four coverage artifact manifest entries expecting ubuntu-latest, causing exact-set validation and coverage reporting to fail even when tests pass.

1 open issue

Review effort: Balanced

Comment thread .github/workflows/ci.yml Resolved
Copilot AI balanced review requested due to automatic review settings October 29, 2026 19: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

The supplied review evidence identifies no active issues requiring changes.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@ReubenBond
ReubenBond merged commit 329738b into dotnet:main Oct 29, 2026
94 checks passed
@ReubenBond
ReubenBond deleted the rb-fix-azure-membership-snapshots branch October 29, 2026 21:40
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.

fix(ci): pin coverage test jobs to an Ubuntu image with libxml2.so.2

2 participants