Skip to content

Add directory migration join regression#10049

Merged
ReubenBond merged 3 commits into
dotnet:mainfrom
ReubenBond:fix/directory-migration-regression-test
May 8, 2026
Merged

Add directory migration join regression#10049
ReubenBond merged 3 commits into
dotnet:mainfrom
ReubenBond:fix/directory-migration-regression-test

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Apr 28, 2026

Copy link
Copy Markdown
Member

Summary

Adds a regression test for a local-to-distributed directory migration join case where a joining silo must not leave stale directory entries on the previous owner.

Changes

  • Add JoiningSilo_DoesNotLeaveStaleEntriesOnPreviousOwner coverage.
  • Keep the existing ElasticChaos stress test separate from the deterministic migration regression.

Stack notes

This branch is stacked above #10053. The focused review range is:

fix/directory-transfer-payload-batching..fix/directory-migration-regression-test

Validation

Focused validation run locally:

  • dotnet test test\Orleans.GrainDirectory.Tests\Orleans.GrainDirectory.Tests.csproj --framework net10.0 --filter "FullyQualifiedName~GrainDirectoryRollingUpgradeTests|FullyQualifiedName~GrainDirectoryPartitionBatchingTests|FullyQualifiedName~GrainDirectoryResilienceTests.JoiningSilo_DoesNotLeaveStaleEntriesOnPreviousOwner" -- -parallel none -noshadow

GrainDirectoryResilienceTests.ElasticChaos was also attempted in a broader run and timed out; the deterministic non-chaos coverage above passed.

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

Adds a targeted regression test to harden Orleans distributed grain directory resilience when a new silo joins and triggers range migration under concurrent directory activity.

Changes:

  • Refactors directory partition integrity verification into a shared helper (CheckIntegrityAsync).
  • Adds a new stress/regression test which runs concurrent directory load while starting an additional silo and repeatedly validating partition integrity.
  • Minor formatting cleanup in existing chaos test.
Show a summary per file
File Description
test/Orleans.GrainDirectory.Tests/GrainDirectory/GrainDirectoryResilienceTests.cs Adds a joining-silo migration regression test and centralizes partition integrity checks into a helper.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 2

Comment thread test/Orleans.GrainDirectory.Tests/GrainDirectory/GrainDirectoryResilienceTests.cs Outdated
@ReubenBond ReubenBond force-pushed the fix/directory-migration-regression-test branch from 4a6cf08 to 0487ccd Compare April 28, 2026 22:54
@ReubenBond ReubenBond force-pushed the fix/directory-stable-ownership-view branch from 1dc35ac to 4f710e1 Compare April 28, 2026 22:55
@ReubenBond ReubenBond force-pushed the fix/directory-migration-regression-test branch from 0487ccd to cbfd741 Compare April 28, 2026 23:13
@ReubenBond ReubenBond force-pushed the fix/directory-stable-ownership-view branch from 4f710e1 to 2d210eb Compare April 28, 2026 23:13
@ReubenBond ReubenBond force-pushed the fix/directory-migration-regression-test branch from cbfd741 to 506f93b Compare April 29, 2026 14:51
@ReubenBond ReubenBond force-pushed the fix/directory-stable-ownership-view branch from 2d210eb to 84d2be4 Compare April 29, 2026 14:51
@ReubenBond ReubenBond force-pushed the fix/directory-migration-regression-test branch from 506f93b to 4f0f87c Compare April 29, 2026 15:09
@ReubenBond ReubenBond force-pushed the fix/directory-stable-ownership-view branch from 84d2be4 to 7f1c458 Compare April 29, 2026 15:10
@ReubenBond ReubenBond force-pushed the fix/directory-migration-regression-test branch from 4f0f87c to 102471c Compare April 29, 2026 18:23
@ReubenBond ReubenBond changed the base branch from fix/directory-stable-ownership-view to feature/distributed-remote-grain-directory April 29, 2026 18:23
@ReubenBond ReubenBond force-pushed the feature/distributed-remote-grain-directory branch from e3e89a1 to 0a5f4a4 Compare April 29, 2026 18:26
@ReubenBond ReubenBond changed the base branch from feature/distributed-remote-grain-directory to main April 29, 2026 18:30
@ReubenBond ReubenBond closed this Apr 29, 2026
@ReubenBond ReubenBond reopened this Apr 29, 2026
@ReubenBond ReubenBond force-pushed the fix/directory-migration-regression-test branch 3 times, most recently from 5eb01d6 to 850cdf9 Compare April 29, 2026 21:01
@ReubenBond

Copy link
Copy Markdown
Member Author

Rebuilt on top of the updated #10050 head.

Cover joining-silo range transfer with concurrent load and partition integrity checks for the distributed grain directory.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ReubenBond ReubenBond force-pushed the fix/directory-migration-regression-test branch from 15b23ac to ee243b7 Compare May 8, 2026 14:55
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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.

Copilot's findings

Comments suppressed due to low confidence (1)

test/Orleans.GrainDirectory.Tests/GrainDirectory/GrainDirectoryResilienceTests.cs:298

  • Same issue as above: currentRange.Difference(previousRange) can return more than one segment. SingleOrDefault() will throw if the added portion splits into multiple ranges. Iterate over the full Difference(...) result set and create an expected "acquire" operation per segment.
                var addedRange = currentRange.Difference(previousRange).SingleOrDefault();
                if (!addedRange.IsEmpty)
                {
  • Files reviewed: 3/3 changed files
  • Comments generated: 1

Comment thread test/Orleans.GrainDirectory.Tests/GrainDirectory/GrainDirectoryResilienceTests.cs Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ReubenBond ReubenBond added this pull request to the merge queue May 8, 2026
Merged via the queue into dotnet:main with commit ff4efb3 May 8, 2026
62 checks passed
@ReubenBond ReubenBond deleted the fix/directory-migration-regression-test branch May 8, 2026 20:25
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 8, 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.

2 participants