Repository navigation
test(directory): validate split handoff invariants - #10772
Merged
ReubenBond merged 2 commits intoAug 22, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
ILocalSiloDetailsimplementation to force a stable, known consistent-hash ring layout forSilo_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
Contributor
Code coverage58.07% line coverage - 58,445 / 100,654 lines Coverage details
|
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
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