Commit ff906b0
Add IMembershipManager abstraction for external membership systems (#9960)
* Add IMembershipManager and IClusterHealthMonitor abstractions for external membership systems
- Add IMembershipManager interface for native membership integration (e.g., RapidCluster)
- Add IClusterHealthMonitor interface to abstract failure detection
- Add NoOpClusterHealthMonitor for systems with external failure detection
- Add NoOpMembershipTable as fallback when IMembershipManager is used
- Update SiloClusteringValidator to accept IMembershipManager as alternative to IMembershipTable
- Update ClusterMembershipService, MembershipAgent, and related services to use IMembershipManager when available
- Update DefaultSiloServices to register fallback NoOpMembershipTable via TryAddSingleton
These changes allow external consensus-based membership systems to integrate natively
with Orleans without requiring a full IMembershipTable implementation.
* Add IProbeHealthMonitor for pluggable probe health checks
- Extract probe health checks from LocalSiloHealthMonitor into IProbeHealthMonitor interface
- Add DefaultProbeHealthMonitor using ProbeRequestMonitor and ClusterHealthMonitor
- Add NoOpProbeHealthMonitor for external failure detection systems
- Register DefaultProbeHealthMonitor in DefaultSiloServices
- Add InternalsVisibleTo for RapidCluster.Orleans assemblies
This allows external membership systems like RapidCluster to disable
Orleans' probe-based health checks that would otherwise report false
degradation when using a different failure detection protocol.
* Refactor membership service to use IMembershipManager interface
Replace direct MembershipTableManager dependencies with the
IMembershipManager abstraction across the runtime:
- ManagementGrain
- MembershipSystemTarget
- LocalSiloHealthMonitor
- SiloHealthMonitor
- SiloMetadataCache
- SiloStatusListenerManager
- SiloRoleBasedPlacementDirector
Also add optional targetVersion parameter to Refresh() for
waiting until membership reaches a specific version.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Address PR review comments on IMembershipManager abstraction
- Remove unused 'using System.Threading.Tasks' in IClusterHealthMonitor.cs
- Add CancellationToken to IMembershipManager.Refresh to prevent infinite loops
- Fix nullable annotation: TrySuspectSilo uses SiloAddress? instead of null!
- Remove InternalsVisibleTo for RapidCluster.* from Runtime and Core csproj
- Use monitoredNodeCount parameter in DefaultProbeHealthMonitor
- Rename constructor parameter in SiloStatusListenerManager to match type
- Fix SiloClusteringValidator to detect NoOpMembershipTable
- Change SiloRoleBasedPlacementDirector to inject IMembershipManager
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Remove NoOpMembershipTable; register MembershipTableManager through IMembershipManager
When a custom IMembershipManager is registered, MembershipTableManager is no
longer instantiated. The NoOpMembershipTable fallback is no longer needed.
- Delete NoOpMembershipTable.cs
- Make IMembershipManager extend ILifecycleParticipant and IHealthCheckParticipant
(same pattern as IClusterHealthMonitor)
- Register MembershipTableManager via TryAddSingleton<IMembershipManager> so
custom implementations take precedence
- Resolve lifecycle/health participants from IMembershipManager interface
- Update SiloClusteringValidator to detect missing clustering config without
depending on NoOpMembershipTable
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix nullable annotation in SiloClusteringValidator
Change IMembershipManager to IMembershipManager? to fix CS8600 error
when assigning null to a non-nullable reference type.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Remove all RapidCluster references from doc comments
Replace product-specific references with generic 'external system'
phrasing in IClusterHealthMonitor, IProbeHealthMonitor,
NoOpClusterHealthMonitor, and NoOpProbeHealthMonitor.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix nullable annotation on TrySuspectSilo explicit implementation
Match the IMembershipManager interface's SiloAddress? annotation on the
indirectProbingSilo parameter. The file uses #nullable disable, so add
a localized #nullable enable/disable around the line.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Change IClusterHealthMonitor.SiloMonitors to IReadOnlyDictionary
Use the more general IReadOnlyDictionary<SiloAddress, SiloHealthMonitor>
instead of ImmutableDictionary so implementations are not forced to use
a specific collection type.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add CancellationToken to all IMembershipManager Task methods
Add a required (no default value) CancellationToken parameter to every
Task-returning method on IMembershipManager:
- UpdateLocalStatus
- TryKillSilo
- TrySuspectSilo
- Refresh (remove existing defaults)
- ProcessGossipSnapshot
- UpdateIAmAlive
Update the MembershipTableManager explicit implementations and all call
sites to pass an appropriate token (shutdown token, caller's token, or
CancellationToken.None where none is available).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix ClusterHealthMonitor not participating in silo lifecycle
TryAddFromExisting skips when ANY registration for the service type
already exists. Since ILifecycleParticipant<ISiloLifecycle> and
IHealthCheckParticipant have many prior registrations, the forwarding
entries for IClusterHealthMonitor were silently dropped. This meant
ClusterHealthMonitor never started its probe loop, breaking failure
detection in longer-running tests (Azure Storage provider tests).
Change TryAddFromExisting to AddFromExisting so the forwarding
registrations are always added. The TryAddSingleton on the
IClusterHealthMonitor registration itself already handles the
replacement scenario for external membership systems.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Rename DefaultProbeHealthMonitor to ProbingSiloHealthMonitor; fix threshold
- Rename DefaultProbeHealthMonitor to ProbingSiloHealthMonitor to preserve
the log category closer to the original LocalSiloHealthMonitor.
- Fix CheckReceivedProbeResponses to use siloMonitors.Count for the
threshold instead of the caller-provided monitoredNodeCount parameter,
matching the original behavior that used the actual expander-graph
monitor count.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 69c28aa commit ff906b0
File tree
21 files changed
+609
-181
lines changed- src
- Orleans.Core
- Orleans.Runtime
- Configuration/Validators
- Core
- Hosting
- MembershipService
- SiloMetadata
- Placement
21 files changed
+609
-181
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
Lines changed: 20 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | | - | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
29 | 46 | | |
30 | 47 | | |
31 | 48 | | |
| |||
43 | 60 | | |
44 | 61 | | |
45 | 62 | | |
46 | | - | |
| 63 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
45 | | - | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
58 | | - | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
64 | | - | |
| 65 | + | |
65 | 66 | | |
66 | | - | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
166 | | - | |
167 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
174 | 175 | | |
175 | | - | |
176 | | - | |
177 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
178 | 179 | | |
| 180 | + | |
179 | 181 | | |
180 | 182 | | |
181 | 183 | | |
| |||
535 | 537 | | |
536 | 538 | | |
537 | 539 | | |
538 | | - | |
| 540 | + | |
539 | 541 | | |
540 | 542 | | |
541 | 543 | | |
| |||
Lines changed: 11 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | | - | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | | - | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | | - | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
57 | | - | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
74 | | - | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
81 | | - | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| |||
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
134 | | - | |
| 135 | + | |
135 | 136 | | |
136 | | - | |
| 137 | + | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
| |||
316 | 317 | | |
317 | 318 | | |
318 | 319 | | |
319 | | - | |
| 320 | + | |
320 | 321 | | |
321 | 322 | | |
322 | 323 | | |
323 | 324 | | |
324 | | - | |
| 325 | + | |
325 | 326 | | |
326 | 327 | | |
327 | 328 | | |
| |||
Lines changed: 10 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
Lines changed: 48 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
0 commit comments