Skip to content

fix: fence silos missing from newer membership views - #10262

Merged
ReubenBond merged 5 commits into
dotnet:mainfrom
ReubenBond:reubenbond-fix-membership-self-fencing
Jul 15, 2026
Merged

ReubenBond merged 5 commits into
dotnet:mainfrom
ReubenBond:reubenbond-fix-membership-self-fencing

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Jul 14, 2026 •

Copy link
Copy Markdown
Member

Membership self-fencing currently depends on the local Dead tombstone remaining in the membership table. If cleanup removes that row before the silo refreshes, it can continue running while heartbeat updates retry indefinitely.

This change fences an already-joined silo when a strictly newer authoritative membership view omits its local entry. It preserves explicit Dead handling and ignores missing entries in startup, stale, equal, or unpublished-join views. Regression coverage includes the dead-row cleanup race.

Microsoft Reviewers: Open in CodeFlow

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: af0ee236-db6e-4527-a33e-1dc1a7ff9307
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

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 strengthens Orleans silo self-fencing in the membership subsystem by terminating a silo which has already joined when it observes a strictly newer authoritative membership view that omits its own membership entry (addressing a race where dead-row cleanup can otherwise allow the silo to keep running while heartbeats retry indefinitely).

Changes:

  • Extend MembershipTableManager update processing to fence the local silo when its entry is missing from a strictly newer membership view, while preserving explicit “local entry is Dead” fencing behavior.
  • Route both table-driven refresh updates and gossip snapshots through a shared membership-update processing path.
  • Add regression tests covering explicit-dead snapshots, missing-local-entry behavior across versions, unpublished-join views, and the dead-row cleanup/prune race.
Show a summary per file
File Description
src/Orleans.Runtime/MembershipService/MembershipTableManager.cs Adds unified membership-update processing which can self-fence on missing-local-entry in newer views and preserves explicit Dead handling.
test/Orleans.Core.Tests/Membership/MembershipTableManagerTests.cs Adds regression coverage for the new self-fencing scenarios and introduces small helpers for snapshot/manager setup.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 1

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: af0ee236-db6e-4527-a33e-1dc1a7ff9307
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: af0ee236-db6e-4527-a33e-1dc1a7ff9307
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: af0ee236-db6e-4527-a33e-1dc1a7ff9307
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: af0ee236-db6e-4527-a33e-1dc1a7ff9307
@ReubenBond
ReubenBond merged commit 335db0b into dotnet:main Jul 15, 2026
62 checks passed
@ReubenBond
ReubenBond deleted the reubenbond-fix-membership-self-fencing branch July 15, 2026 00:01
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