Repository navigation
fix(membership): default legacy snapshots to empty death history - #11602
Merged
ReubenBond merged 1 commit intoOct 27, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the membership snapshot compatibility change.
No open issues 🎉
What changed in this PR
Fixes rolling-upgrade compatibility for Orleans membership snapshots from older silos by exposing empty death history when the serialized field is absent.
Changes:
- Uses nullable backing storage in both snapshot types while preserving field ID 3, its serialized type, and constructor-time freezing.
- Adds wire-format regression tests for legacy-to-current decoding and current-to-legacy preservation of membership versions and rows.
| File | Description |
|---|---|
test/Orleans.Core.Tests/Membership/MembershipTableSnapshotTests.cs |
Adds compatibility tests in both directions for both snapshot types. |
src/Orleans.Runtime/MembershipService/ClusterMembershipSnapshot.cs |
Defaults missing cluster death history to an immutable empty set. |
src/Orleans.Core/Runtime/MembershipTableSnapshot.cs |
Defaults missing membership-table death history to an immutable empty set. |
Review effort: Balanced
Contributor
Code coverage
Report-only conclusion: current-main baseline stale. Current main advanced from 1ea0875 to 240eee5 while coverage was aggregated. Coverage combines every CI test matrix job, including providers, CodeGen, .NET 8/10, Linux, Windows, and macOS, using canonical physical source and branch identities. The comparison remains report-only while normal line and branch variance is calibrated. Coverage details |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Membership snapshots written by older silos contain the original version and membership rows, with no retained death-history field. After #11589, deserializing those payloads leaves
RecentlyDeadSilosnull because the serializer bypasses constructors. Status lookup and snapshot merging then fail during rolling upgrades. This also affects 11.0.0-preview.1.Solution
Store serialized field 3 in nullable private backing storage while keeping its field ID and
IReadOnlySet<SiloAddress>type. Both snapshot types expose an immutable empty death-history set when that field is absent, establishing the non-null contract at the snapshot boundary while preserving canonical rows and constructor-time freezing.Add real-wire regression cases for both snapshot types in both compatibility directions: legacy payloads decode with their original version and rows plus empty death history, and legacy readers preserve the version and rows from current payloads while skipping added fields.
Applies the isolated compatibility correction from the 10.x backport in #11593 to
main.Microsoft Reviewers: Open in CodeFlow