Repository navigation
fix(runtime): preserve default directory with named distributed registration - #11553
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused changes consistently preserve default-directory ownership, with regression coverage and no unresolved findings.
No open issues 🎉
What changed in this PR
Fixes #11512 by keeping legacy remote endpoints aligned with the default grain directory, preventing named distributed registration from causing duplicate activations.
Changes:
- Preserve local directory endpoints when the distributed directory is named.
- Register distributed compatibility endpoints during lifecycle participation only when it is the default.
- Add two-silo activation-uniqueness coverage for named and default configurations.
| File | Description |
|---|---|
| test/Orleans.GrainDirectory.Tests/GrainDirectory/NamedGrainDirectoryTests.cs | Adds regression tests and a distributed-default control case. |
| src/Orleans.Runtime/GrainDirectory/LocalGrainDirectory.cs | Bases endpoint ownership on default-directory selection. |
| src/Orleans.Runtime/GrainDirectory/DistributedRemoteGrainDirectory.cs | Clarifies endpoint ownership in documentation. |
| src/Orleans.Runtime/GrainDirectory/DistributedGrainDirectory.cs | Conditionally registers compatibility endpoints during lifecycle participation. |
Review effort: Balanced
This was referenced Oct 21, 2026
Open
ReubenBond
added a commit
to ReubenBond/orleans
that referenced
this pull request
Oct 22, 2026
…tration (dotnet#11553) (cherry picked from commit 1255777) Upstream-PR: dotnet#11553 Upstream-Commit: 1255777
ReubenBond
added a commit
that referenced
this pull request
Oct 23, 2026
This was referenced Oct 29, 2026
This was referenced Nov 5, 2026
This was referenced Nov 6, 2026
Bump Microsoft.Orleans.Clustering.AdoNet and Microsoft.Orleans.Runtime
ScarletKuro/Scarlet.Orleans#9
Open
This was referenced Nov 16, 2026
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.
Problem
Registering a named distributed grain directory also replaced the legacy remote directory endpoints. Default-directory grains then used different authorities for local and remote registrations, allowing duplicate activations in a stable cluster. This regressed in #10050.
Solution
Make legacy remote endpoint ownership follow the configured default directory. The local directory retains its remote service and cache-validator endpoints when the distributed directory is named; the distributed directory installs its rolling-upgrade adapters during lifecycle participation when it is the default. Its client and partition endpoints continue serving named registrations.
Add a two-silo regression which explicitly disables the test harness's default directory, registers a default-directory grain from a non-owner silo, and then calls it from the directory owner. It compares physical activation addresses for both default-directory and named-directory grains, with a distributed-as-default control case.
Fixes #11512.
Microsoft Reviewers: Open in CodeFlow