fix: exclude non-Active silos from placement - #10219
Merged
ReubenBond merged 24 commits intoJun 15, 2026
Merged
Conversation
ReubenBond
force-pushed
the
reubenbond/active-silo-placement
branch
3 times, most recently
from
June 13, 2026 17:54
cdef309 to
9bb75b5
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Orleans placement and cluster-manifest handling so that placement candidates/manifests better reflect current cluster availability (notably around shutdown/termination), while also tightening APIs and reducing manifest duplication.
Changes:
- Update
IPlacementContext.GetCompatibleSilosto returnImmutableArray<SiloAddress>and adjust placement directors/tests to match. - Update
PlacementServiceto useISiloStatusOracle.GetActiveSilos()for active-silo filtering and filter versioned compatible-silo results by active membership. - Improve cluster manifest behavior (sync pruning of non-active silos, manifest publishing behavior, manifest deduplication) and add new targeted tests.
Show a summary per file
| File | Description |
|---|---|
| test/Orleans.Core.Tests/Runtime/PlacementServiceTests.cs | Adds coverage for excluding local silo during shutdown; updates test scaffolding for GetActiveSilos()/ImmutableArray. |
| test/Orleans.Core.Tests/Runtime/LocalPlacementDirectorTests.cs | Updates mocks to return ImmutableArray from GetCompatibleSilos. |
| test/Orleans.Core.Tests/Runtime/ActivationCountPlacementDirectorTests.cs | Updates mocks to return ImmutableArray from GetCompatibleSilos. |
| test/Orleans.Core.Tests/Manifest/ClusterManifestProviderTests.cs | New tests validating manifest pruning/publishing behavior and placement’s active-only results. |
| test/Orleans.Core.Tests/Manifest/ClusterManifestDeduplicationTests.cs | New tests validating structural equality/deduplication of manifest objects. |
| test/Grains/TestGrains/VersionAwarePlacementDirector.cs | Adjusts to treat compatible silos as IReadOnlyList for ImmutableArray compatibility. |
| src/Orleans.Runtime/Versions/CachedVersionSelectorManager.cs | Switches cached suitable-silos list to ImmutableArray. |
| src/Orleans.Runtime/Placement/SiloRoleBasedPlacementDirector.cs | Uses ImmutableArray for compatible-silo list and IsEmpty checks. |
| src/Orleans.Runtime/Placement/PlacementService.cs | Changes compatible-silo API to ImmutableArray, uses GetActiveSilos(), and filters versioned results by actives. |
| src/Orleans.Runtime/Placement/ActivationCountPlacementDirector.cs | Updates selector helper signature to accept ImmutableArray. |
| src/Orleans.Runtime/Manifest/ClusterManifestProvider.cs | Refactors manifest synchronization/publishing and membership-update processing; now depends on IClusterMembershipService. |
| src/Orleans.Core/Placement/IPlacementDirector.cs | Updates placement hint helper signature to accept ImmutableArray. |
| src/Orleans.Core/Placement/IPlacementContext.cs | Updates placement context API to return ImmutableArray. |
| src/Orleans.Core/Manifest/GrainBindings.cs | Small refactor to centralize manifest processing loop into a local function. |
| src/Orleans.Core/Core/GrainInterfaceTypeToGrainTypeResolver.cs | Refactor to centralize per-manifest cache building logic into a helper method. |
| src/Orleans.Core.Abstractions/Manifest/GrainProperties.cs | Adds structural equality/hash support for deduplication. |
| src/Orleans.Core.Abstractions/Manifest/GrainManifest.cs | Adds structural equality/hash support for deduplication. |
| src/Orleans.Core.Abstractions/Manifest/GrainInterfaceProperties.cs | Adds structural equality/hash support for deduplication. |
| src/Orleans.Core.Abstractions/Manifest/ClusterManifest.cs | Adds AllGrainManifests ctor and implements manifest/property deduplication. |
| src/api/Orleans.Core/Orleans.Core.cs | Public API update for GetCompatibleSilos and GetPlacementHint signatures. |
| src/api/Orleans.Core.Abstractions/Orleans.Core.Abstractions.cs | Public API update for new ClusterManifest ctor and new equality members. |
Copilot's findings
- Files reviewed: 21/21 changed files
- Comments generated: 6
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>
Prune cluster manifests when membership versions advance so GrainVersionManifest and version selector caches only expose active silos. Simplify placement compatibility to trust those active-only caches while retaining the active-silo guard after extensible filters. 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>
Prune cluster manifests when membership versions advance so GrainVersionManifest and version selector caches only expose active silos. Simplify placement compatibility to trust those active-only caches while retaining the active-silo guard after extensible filters. 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>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ReubenBond
force-pushed
the
reubenbond/active-silo-placement
branch
from
June 14, 2026 04:05
9bb75b5 to
a61b8e7
Compare
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>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove synchronous local silo insertion from the cluster manifest provider and let the standard manifest fetch path populate all active silos. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Return immediately for same-version cluster manifests and only prune non-active silos when advancing to a newer membership version. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rely on fetch success to indicate that all missing active silo manifests were retrieved, and treat null results as unsuccessful fetches. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot's findings
Comments suppressed due to low confidence (1)
src/Orleans.Runtime/MembershipService/SiloStatusOracle.cs:59
- GetActiveSilos returns the internal cached array instance. Since arrays are mutable, a caller can inadvertently (or intentionally) modify the returned array and corrupt the oracle’s cache, affecting placement/liveness decisions.
public SiloAddress[] GetActiveSilos()
{
EnsureFreshCache();
return _activeSilos;
}
- Files reviewed: 14/14 changed files
- Comments generated: 6
Synchronously add the local silo manifest when advancing to a membership version where the local silo is active. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Avoid re-deduplicating grain manifests which are already known canonical while preserving the fallback for equivalent unseen manifests. 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>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Fixes placement eligibility so compatible silo candidates come from active membership/manifest state by construction. GetCompatibleSilos continues to return SiloAddress[] and uses the cached active-silo list from ISiloStatusOracle.GetActiveSilos() for homogeneous test-mode candidates while preserving deferred placement-filter materialization.