Skip to content

Simplify LocalGrainDirectory membership processing#10089

Merged
ReubenBond merged 4 commits into
dotnet:mainfrom
ReubenBond:split/pr10085-04-processing-cleanup
May 12, 2026
Merged

Simplify LocalGrainDirectory membership processing#10089
ReubenBond merged 4 commits into
dotnet:mainfrom
ReubenBond:split/pr10085-04-processing-cleanup

Conversation

@ReubenBond

@ReubenBond ReubenBond commented May 12, 2026

Copy link
Copy Markdown
Member

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.

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 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 in LocalGrainDirectory with snapshot-driven processing via IClusterMembershipService, including simplified cache/directory cleanup rules.
  • Remove the IsSiloInCluster method from ILocalGrainDirectory and move terminating-silo activation deactivation handling into LocalGrainDirectory (removing the prior Catalog helper).
  • 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

Comment thread src/Orleans.Runtime/GrainDirectory/GrainDirectoryHandoffManager.cs
Comment thread src/Orleans.Runtime/GrainDirectory/LocalGrainDirectory.cs Outdated
@ReubenBond ReubenBond force-pushed the split/pr10085-04-processing-cleanup branch 3 times, most recently from a4cc38a to 9330977 Compare May 12, 2026 17:57
@ReubenBond ReubenBond enabled auto-merge May 12, 2026 18:11
ReubenBond and others added 4 commits May 12, 2026 11:32
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>
@ReubenBond ReubenBond force-pushed the split/pr10085-04-processing-cleanup branch from 9330977 to 834b311 Compare May 12, 2026 18:34
@ReubenBond ReubenBond added this pull request to the merge queue May 12, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 12, 2026
@ReubenBond ReubenBond added this pull request to the merge queue May 12, 2026
Merged via the queue into dotnet:main with commit b739c41 May 12, 2026
62 checks passed
@ReubenBond ReubenBond deleted the split/pr10085-04-processing-cleanup branch May 12, 2026 20:03
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 12, 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