Skip to content

fix(runtime): publish local shutdown membership state - #10596

Merged
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-fix-publish-shutdown-membership-state
Aug 14, 2026
Merged

ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-fix-publish-shutdown-membership-state

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Aug 14, 2026

Copy link
Copy Markdown
Member

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

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 14, 2026 18:16

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 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

Comment thread src/Orleans.Runtime/MembershipService/MembershipTableManager.cs
Comment thread src/Orleans.Runtime/MembershipService/MembershipTableManager.cs
@ReubenBond
ReubenBond merged commit 0b6161f into dotnet:main Aug 14, 2026
134 of 137 checks passed
@ReubenBond
ReubenBond deleted the rb-fix-publish-shutdown-membership-state branch August 14, 2026 21:00
This was referenced Aug 28, 2026
This was referenced Sep 8, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 14, 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