Commit 89e83c8
Align all membership providers' CleanupDefunctSiloEntries to remove non-Active stale entries (#9972)
* Implement CleanupDefunctSiloEntries for development clustering
Fix InMemoryMembershipTable.CleanupDefunctSiloEntries to remove all
non-Active old entries instead of only Dead entries, consistent with
other provider implementations (Cassandra, Azure, etc.).
Add unit tests for the fixed behavior in InMemoryMembershipTableTests.
Co-authored-by: rkargMsft <164392675+rkargMsft@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/orleans/sessions/28c01159-31b4-4141-841b-f5f1aec83732
* Also fix CleanupDefunctSiloEntries in InProcessMembershipTable
Apply the same non-Active predicate to InProcessMembershipTable
used by the in-process test cluster, for consistency.
Co-authored-by: ReubenBond <203839+ReubenBond@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/orleans/sessions/8e740b40-c62d-4e85-8aac-9c8a56f39bc7
* Align all membership providers: ZooKeeper and Cosmos cleanup non-Active stale entries
- CosmosMembershipTable: remove all non-Active stale entries (was only Dead),
using proper Math.Max(IAmAliveTime, StartTime) timestamp check
- ZooKeeperBasedMembershipTable: implement CleanupDefunctSiloEntries (was
NotImplementedException) to delete non-Active stale entries
Co-authored-by: rkargMsft <164392675+rkargMsft@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/orleans/sessions/cfa9474b-c8f1-4707-b13e-8ac1054679e7
* Cosmos: push CleanupDefunctSiloEntries filters to the server via LINQ query
Instead of fetching all silos and filtering in memory, build a server-side LINQ
query that filters by status != Active and both date fields. The Status field is
indexed; IAmAliveTime/StartTime are not indexed but the status filter reduces the
result set without schema changes.
Co-authored-by: rkargMsft <164392675+rkargMsft@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/orleans/sessions/55b130f3-7c14-4eac-bc1d-a808e43da0cb
* Cosmos CleanupDefunctSiloEntries: push only Status filter server-side, keep date check in C#
The Status field is indexed in Cosmos so filtering non-Active entries server-side
is efficient. The date check uses Math.Max(IAmAliveTime, StartTime) semantics in
C# to correctly handle cases where IAmAliveTime may be uninitialized (DateTime.MinValue).
Co-authored-by: rkargMsft <164392675+rkargMsft@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/orleans/sessions/06efe6ea-ad61-43fd-ba3e-9e4f08a8752f
* Simplify date comparison: compare max ticks directly instead of creating new DateTime
Co-authored-by: rkargMsft <164392675+rkargMsft@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/orleans/sessions/0d84e85c-6909-4b6e-8d16-0f2e6782c645
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rkargMsft <164392675+rkargMsft@users.noreply.github.com>
Co-authored-by: ReubenBond <203839+ReubenBond@users.noreply.github.com>1 parent 6daf6ec commit 89e83c8
File tree
5 files changed
+158
-9
lines changed- src
- Azure/Orleans.Clustering.Cosmos/Membership
- Orleans.Clustering.ZooKeeper
- Orleans.Runtime/MembershipService
- Orleans.TestingHost/InProcess
- test/Orleans.Runtime.Internal.Tests/MembershipTests
5 files changed
+158
-9
lines changedLines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
107 | 125 | | |
108 | 126 | | |
109 | 127 | | |
| |||
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
339 | | - | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
340 | 356 | | |
341 | 357 | | |
342 | 358 | | |
| |||
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
| 90 | + | |
| 91 | + | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
181 | 180 | | |
182 | 181 | | |
183 | 182 | | |
| |||
Lines changed: 116 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 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
0 commit comments