Simplify LocalGrainDirectory membership processing#10089
Merged
ReubenBond merged 4 commits intoMay 12, 2026
Conversation
This was referenced May 12, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR continues the LocalGrainDirectory membership-reconciliation refactor by switching remaining membership processing from silo-status-event plumbing to cluster membership snapshots, simplifying snapshot application and cleanup paths, and adjusting handoff/retry/logging behavior.
Changes:
- Replace
ISiloStatusListener-based membership updates inLocalGrainDirectorywith snapshot-driven processing viaIClusterMembershipService, including simplified cache/directory cleanup rules. - Remove the
IsSiloInClustermethod fromILocalGrainDirectoryand move terminating-silo activation deactivation handling intoLocalGrainDirectory(removing the priorCataloghelper). - Adjust grain-directory handoff behavior (including successor checks and retry queue behavior), plus associated logging.
Show a summary per file
| File | Description |
|---|---|
| test/Orleans.Core.Tests/Directory/CachedGrainLocatorTests.cs | Updates test setup to provide an IClusterMembershipService to LocalGrainDirectory. |
| src/Orleans.Runtime/GrainDirectory/LocalGrainDirectory.cs | Reworks membership processing to apply IClusterMembershipService snapshots, updates cleanup rules, and relocates terminating-silo activation deactivation + logging. |
| src/Orleans.Runtime/GrainDirectory/ILocalGrainDirectory.cs | Removes the IsSiloInCluster contract surface. |
| src/Orleans.Runtime/GrainDirectory/GrainDirectoryHandoffManager.cs | Tightens handoff eligibility checks and changes pending-operation retry/dequeue behavior and filtering. |
| src/Orleans.Runtime/Catalog/Catalog.cs | Removes directory-related terminating-silo handling that is now performed by LocalGrainDirectory. |
Copilot's findings
- Files reviewed: 5/5 changed files
- Comments generated: 2
a4cc38a to
9330977
Compare
Apply the latest cluster membership snapshot directly, remove the unused IsSiloInCluster contract, and simplify related LocalGrainDirectory expressions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Clarify why LocalGrainDirectory removes dead-silo activations and stale unknown-silo activations during membership reconciliation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
9330977 to
834b311
Compare
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.
Part 4 of 7 split from #10085.
Problem:
After snapshot-based reconciliation, some LocalGrainDirectory code still carried obsolete membership-update plumbing and less clear cleanup/retry behavior.
Solution:
Simplify snapshot application, remove the unused IsSiloInCluster contract, document defunct activation cleanup, and incorporate handoff/logging review fixes.
Stack:
Merge after #10088. This branch is stacked on split/pr10085-03-refresh-newer-membership; until earlier PRs merge, GitHub may show earlier stack changes. Incremental compare: ReubenBond/orleans@split/pr10085-03-refresh-newer-membership...split/pr10085-04-processing-cleanup
Review focus:
Removed membership contract surface, simplified snapshot application, and handoff retry/logging adjustments.