Skip to content

test(directory): validate split handoff invariants - #10772

Merged
ReubenBond merged 2 commits into
dotnet:mainfrom
ReubenBond:rb-fix-rolling-upgrade-split-flake
Aug 22, 2026
Merged

ReubenBond merged 2 commits into
dotnet:mainfrom
ReubenBond:rb-fix-rolling-upgrade-split-flake

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Aug 22, 2026 •

Copy link
Copy Markdown
Member

The non-empty assertion added in #10341 treated randomized ring topology as test setup: a valid split with no registrations could fail even though the handoff preserved every directory invariant.

Before each distributed silo joins, snapshot the existing local directory partitions. After membership convergence, use the runtime's owner calculation to derive the exact registrations assigned to the joining silo. Empty transfer sets must produce a zero-count handoff. Non-empty transfer sets must match the observed count, install a live authoritative distributed registration, preserve every non-transferred local registration, remove every transferred sender registration, and complete on the recipient before sender removal.

This keeps the production ring topology intact while validating the outcome of every split.

Fixes #10761

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.

Pull request overview

This PR stabilizes the RollingUpgrade_LocalToDistributed_NoErrors grain directory rolling-upgrade test by making silo ring placement deterministic and pre-seeding specific grains so that split-partition compatibility handoffs are guaranteed to be non-empty (eliminating the prior flakiness from randomized ring topology and incidental grain hashes).

Changes:

  • Injects a deterministic ILocalSiloDetails implementation to force a stable, known consistent-hash ring layout for Silo_0–Silo_5.
  • Adds a seeding step which creates and verifies one live local-directory registration in each hash range that will be transferred during the planned compatibility splits.
  • Strengthens the final durability assertion to require a minimum number of non-empty durable handoffs (matching the number of legacy silos being replaced).
Show a summary per file
File Description
test/Orleans.GrainDirectory.Tests/GrainDirectory/GrainDirectoryRollingUpgradeTests.cs Makes the rolling-upgrade split-handoff scenario deterministic by fixing ring positions, seeding registrations in future split ranges, and asserting a minimum count of non-empty durable handoffs.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

Copilot AI review requested due to automatic review settings August 22, 2026 14:57
@ReubenBond ReubenBond changed the title test(directory): make split handoffs deterministic test(directory): validate split handoff invariants Aug 22, 2026

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.

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@ReubenBond
ReubenBond merged commit e0247e1 into dotnet:main Aug 22, 2026
76 checks passed
@ReubenBond
ReubenBond deleted the rb-fix-rolling-upgrade-split-flake branch August 22, 2026 15:23
@github-actions

Copy link
Copy Markdown
Contributor

Code coverage

58.07% line coverage - 58,445 / 100,654 lines

Coverage details

@github-actions github-actions Bot locked and limited conversation to collaborators Sep 22, 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.

Flaky rolling-upgrade test can observe only empty split handoffs

2 participants