fix(runtime): publish local shutdown membership state - #10596
Merged
ReubenBond merged 1 commit intoAug 14, 2026
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Orleans runtime membership handling so the local silo status is published atomically alongside membership snapshots, preventing divergence between local state and the shared membership view—especially around intentional shutdown paths vs unexpected death.
Changes:
- Publishes a combined membership state (snapshot + derived local silo status) to keep membership decisions consistent.
- Updates shutdown handling so Dead transitions during intentional lifecycle stop do not trigger fatal termination, while still failing fast for unexpected Dead transitions.
- Adds/adjusts tests to cover Dead transitions inside/outside shutdown and stop-before-start lifecycle behavior.
Show a summary per file
| File | Description |
|---|---|
src/Orleans.Runtime/MembershipService/MembershipTableManager.cs |
Introduces combined published membership state, adjusts death/self-termination logic, and ties shutdown behavior to lifecycle stopping state. |
src/Orleans.Runtime/Lifecycle/SiloLifecycleSubject.cs |
Tracks whether lifecycle has started/stopping to distinguish intentional shutdown from other termination scenarios. |
test/Orleans.Core.Tests/Membership/MembershipTableManagerTests.cs |
Adds tests for Dead transitions during shutdown vs normal operation and updates expectations for local status publishing. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Lite
This was referenced Aug 14, 2026
This was referenced Aug 14, 2026
This was referenced Aug 28, 2026
Merged
This was referenced Sep 1, 2026
This was referenced Sep 8, 2026
Open
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.
MembershipTableManager maintained local status separately from published membership snapshots, allowing local state to diverge and treating intentional shutdown transitions as fatal membership failures.
This change atomically publishes each membership snapshot together with the local silo status derived from it. It also records lifecycle stop entry so Dead transitions during an intentional shutdown do not invoke fatal termination, while preserving fatal handling for unexpected Dead transitions. When a newer incarnation is detected, the silo now persists its Dead status before self-termination.
Keeping snapshot and local status in one published state makes membership decisions consistent and gives shutdown paths a clear distinction from unexpected membership death.
Microsoft Reviewers: Open in CodeFlow