GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(membership): retain local health history by ReubenBond · Pull Request #10502 · dotnet/orleans

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Aug 11, 2026 •
edited by dotnet-policy-service Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Local silo health checks currently run on demand, can overlap, and retain no history. This makes concurrent probe decisions repeat expensive checks and prevents callers from reasoning about recent host degradation.

This change records one minute of typed health events, serializes sampling to at most once per second, and aggregates the worst observation per check over a requested interval. Host-local and network-derived checks are classified separately so probe timeout dilation uses only recent local-host degradation.

Watchdog runtime, GC, component-check, and thread-pool stalls remain distinct events for query-time aggregation. Membership health components now use the keyed membership TimeProvider while preserving the connection-liveness checks already present on main.

Microsoft Reviewers: Open in CodeFlow

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ReubenBond
ReubenBond force-pushed the rb-health-status-history branch 2 times, most recently from 95146d1 to c407cde Compare August 11, 2026 21:14
@ReubenBond ReubenBond mentioned this pull request Aug 11, 2026
feat(membership): adapt probe timeouts #10510
Merged
Copilot AI lite review requested due to automatic review settings August 11, 2026 23:32
@ReubenBond
ReubenBond force-pushed the rb-health-status-history branch from c407cde to 13b9481 Compare August 11, 2026 23:32
Copilot started reviewing on behalf of ReubenBond August 11, 2026 23:33
View session
Copilot AI reviewed Aug 11, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

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 enhances Orleans membership health monitoring by retaining a short history of local silo health events and by making time-dependent health/probing behavior testable and deterministic via injected (keyed) TimeProviders.

Changes:

  • Add a typed, 1-minute local health event history and interval-based aggregation (with separate local vs network health categories).
  • Serialize/limit on-demand health sampling cadence (targeting once-per-second) and use aggregated local-host degradation to dilate probe timeouts.
  • Plumb the keyed membership TimeProvider through membership/runtime components and add focused unit tests for the new behavior.
Show a summary per file
File Description
test/Orleans.Runtime.Tests/Diagnostics/WatchdogTests.cs Adds tests validating that watchdog runtime checks emit typed local health events.
test/Orleans.Core.Tests/Membership/SiloHealthMonitorTests.cs Updates mocks and adds coverage for probe-timeout dilation driven by local health status.
test/Orleans.Core.Tests/Membership/ProbeRequestMonitorTests.cs Adds test coverage for ProbeRequestMonitor using injected time and reset semantics.
test/Orleans.Core.Tests/Membership/MembershipSystemTargetTests.cs Adds tests covering indirect probe timing and local health interval queries.
test/Orleans.Core.Tests/Membership/MembershipAgentTests.cs Updates to new ILocalSiloHealthMonitor API and new ClusterHealthMonitor ctor signature.
test/Orleans.Core.Tests/Membership/LocalSiloHealthMonitorTests.cs Adds extensive tests for event retention, aggregation, concurrency, and sampling behavior.
test/Orleans.Core.Tests/Membership/ClusterHealthMonitorTests.cs Updates to new ILocalSiloHealthMonitor API and adds time-provider-based stale-join eviction test.
src/Orleans.Runtime/Silo/Watchdog.cs Records runtime stall/GC pause/component stall events into the local health event recorder; uses injected keyed TimeProvider.
src/Orleans.Runtime/Networking/ProbeRequestMonitor.cs Switches to injected keyed TimeProvider and timestamp-based tracking.
src/Orleans.Runtime/MembershipService/SiloHealthMonitor.cs Uses TimeProvider for timing/cancellation; dilates probe timeout based on aggregated local health status.
src/Orleans.Runtime/MembershipService/MembershipSystemTarget.cs Measures probe timing using TimeProvider and queries aggregated local health over the probe interval.
src/Orleans.Runtime/MembershipService/LocalSiloHealthMonitor.cs Introduces typed health events/status, retention window, on-demand caching cadence, and interval aggregation APIs.
src/Orleans.Runtime/MembershipService/ClusterHealthMonitor.cs Moves membership processing and shutdown timing onto injected keyed TimeProvider.
src/Orleans.Runtime/Hosting/DefaultSiloServices.cs Registers ILocalSiloHealthEventRecorder from the LocalSiloHealthMonitor singleton.
src/Orleans.Core/Configuration/Options/ClusterMembershipOptions.cs Updates option documentation to reflect new sampling/logging behavior.

Review details

Tip

Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 15/15 changed files
  • Comments generated: 1
  • Review effort level: Lite

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/Orleans.Runtime/MembershipService/MembershipSystemTarget.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Copilot AI review requested due to automatic review settings August 12, 2026 00:22
Copilot started reviewing on behalf of ReubenBond August 12, 2026 00:22
View session
Copilot AI reviewed Aug 12, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

Suppressed comments (2)

src/Orleans.Runtime/MembershipService/SiloHealthMonitor.cs:56

  • ElapsedSinceLastResponse reads _lastSuccessfulResponseTimestamp as a long? without synchronization. Nullable<long> is not an atomic read/write (it is larger than 64-bits), so this can tear when ProbeDirectly/ProbeIndirectly update the field concurrently with ProbingSiloHealthMonitor reading it, resulting in incorrect/negative elapsed values or sporadic HasValue flips. Consider storing a non-nullable long timestamp and reading it atomically via Volatile.Read (the field is always initialized in the ctor anyway).
        public TimeSpan? ElapsedSinceLastResponse
            => _lastSuccessfulResponseTimestamp is { } timestamp ? _timeProvider.GetElapsedTime(timestamp) : null;

src/Orleans.Runtime/MembershipService/LocalSiloHealthMonitor.cs:593

  • SubtractTimestamp converts TimeSpan to a timestamp delta via duration.TotalSeconds * TimestampFrequency. For very small durations (eg TimeSpan.FromTicks(1)), the double conversion can round down and produce a 0 delta, making lookback queries subtly wrong at sub-second granularity. Using integer arithmetic based on duration.Ticks avoids precision loss.
        private long SubtractTimestamp(long timestamp, TimeSpan duration)
            => timestamp - (long)(duration.TotalSeconds * _timeProvider.TimestampFrequency);
  • Files reviewed: 16/16 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ReubenBond ReubenBond mentioned this pull request Aug 12, 2026
Flaky test: ADO.NET multi-stream tests time out after 30 seconds #10458
Closed
ReubenBond added 4 commits August 11, 2026 19:16
@ReubenBond
feat(membership): retain local health history
6fd582c
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 63571f45-a79f-49f9-a50e-296c1355e312
@ReubenBond
fix(membership): assess health after indirect probes
5b833f6
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 63571f45-a79f-49f9-a50e-296c1355e312
@ReubenBond
refactor(membership): use monotonic health timestamps
dba3dce
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 63571f45-a79f-49f9-a50e-296c1355e312
@ReubenBond
perf(membership): bucket local health history
d76a87a
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 63571f45-a79f-49f9-a50e-296c1355e312
Copilot AI review requested due to automatic review settings August 12, 2026 02:19
@ReubenBond
ReubenBond force-pushed the rb-health-status-history branch from 85c5aae to d76a87a Compare August 12, 2026 02:19
Copilot started reviewing on behalf of ReubenBond August 12, 2026 02:20
View session
@ReubenBond
test(membership): stabilize concurrent health sampling
f8c03f8
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 63571f45-a79f-49f9-a50e-296c1355e312
Copilot AI reviewed Aug 12, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

Suppressed comments (2)

src/Orleans.Runtime/MembershipService/SiloHealthMonitor.cs:296

  • ProbeDirectly calls roundTripTimer.GetElapsedTime(...) twice (once when formatting the OperationCanceledException message and again when computing roundTripTime). If time advances between those calls, the exception message and logged round-trip time can disagree, and it does extra timestamp reads.
            catch (OperationCanceledException exception)
            {
                failureException = new OperationCanceledException(
                    $"The ping attempt was cancelled after {roundTripTimer.GetElapsedTime(out _)}. Ping #{id}",
                    exception);
            }
            catch (Exception exception)
            {
                failureException = exception;
            }
            var roundTripTime = roundTripTimer.GetElapsedTime(out _);

src/Orleans.Runtime/MembershipService/LocalSiloHealthMonitor.cs:52

  • LocalSiloHealthStatus.Complaints currently includes any event with a non-null Complaint, even when the event has Score=0 (for example, informational events like GarbageCollectionPause). This can add noise to degradation logs since the complaint list can include non-degrading observations.
    internal readonly record struct LocalSiloHealthStatus(int Score, ImmutableArray<LocalSiloHealthEvent> Events)
    {
        public ImmutableArray<string> Complaints
            => [.. Events.Where(static status => status.Complaint is not null).Select(static status => status.Complaint!)];
  • Files reviewed: 18/18 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Copilot AI review requested due to automatic review settings August 12, 2026 02:26
Copilot started reviewing on behalf of ReubenBond August 12, 2026 02:26
View session
Copilot AI reviewed Aug 12, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 18/18 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ReubenBond
ReubenBond merged commit 15fc1fe into dotnet:main Aug 12, 2026
134 of 138 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@ReubenBond
ReubenBond deleted the rb-health-status-history branch August 12, 2026 04:33
This was referenced Aug 28, 2026
Bump Microsoft.Orleans.Dashboard from 10.2.2 to 10.3.0 csrakowski/FeedManager#20
Merged
Bump Microsoft.Orleans.Persistence.AdoNet from 10.2.2 to 10.3.0 csrakowski/FeedManager#21
Merged
Bump Microsoft.Orleans.Persistence.Memory from 10.2.2 to 10.3.0 csrakowski/FeedManager#22
Closed
Bump Microsoft.Orleans.Persistence.Redis from 10.2.2 to 10.3.0 csrakowski/FeedManager#23
Merged
Bump Microsoft.Orleans.Runtime from 10.2.2 to 10.3.0 csrakowski/FeedManager#24
Merged
This was referenced Aug 31, 2026
chore: Bump Microsoft.Orleans.Serialization.Abstractions from 10.2.2 to 10.3.1 managedcode/Communication#154
Merged
chore: Bump Microsoft.Orleans.Persistence.Memory and 3 others managedcode/Communication#155
Closed
chore: Bump Microsoft.Orleans.TestingHost from 10.2.2 to 10.3.1 managedcode/Communication#156
Merged
Bump the orleans group with 1 update vgmello/momentum#341
Closed
Bump Microsoft.Orleans.BroadcastChannel and 5 others intochat/intochat#77
Closed
Bump the orleans group with 10 updates bartul/agave#86
Closed
Bump the orleans group with 3 updates microsoft/aspire-samples#1930
Closed
Bump the nuget-minor-patch group with 21 updates Systemorph/MeshWeaver#3519
Closed
chore(deps): Bump the nuget-patch-and-minor group with 13 updates petesramek/microservices-vs-virtual-actors#8
Closed
This was referenced Sep 7, 2026
Bump the orleans group with 3 updates microsoft/aspire-samples#1931
Merged
Bump the orleans group with 10 updates bartul/agave#87
Merged
Bump the dotnet group with 5 updates dotnet/docs#55908
Merged
Bump the dotnet group with 4 updates dotnet/docs#55909
Merged
Bump the dotnet group with 4 updates dotnet/docs#55910
Merged
Bump the dotnet group with 5 updates dotnet/docs#55911
Merged
Bump the dotnet group with 4 updates IvanMarkitan/dotnet-docs#838
Closed
Bump the dotnet group with 6 updates IvanMarkitan/dotnet-docs#839
Closed
Bump the dotnet group with 7 updates IvanMarkitan/dotnet-docs#840
Closed
Bump Microsoft.Orleans.Sdk and Microsoft.Orleans.Server IvanMarkitan/dotnet-docs#843
Open
Bump Microsoft.Orleans.Clustering.Redis and 4 others IvanMarkitan/dotnet-docs#845
Closed
Bump the dotnet group with 7 updates IvanMarkitan/dotnet-docs#846
Open
Bump the dotnet group with 5 updates BillWagner/docs#9804
Closed
Bump the dotnet group with 4 updates BillWagner/docs#9805
Closed
Bump the dotnet group with 4 updates BillWagner/docs#9806
Closed
Bump the dotnet group with 5 updates BillWagner/docs#9807
Closed
Bump the dotnet group with 7 updates zbalkan/docs#2339
Closed
Bump the dotnet group with 5 updates zbalkan/docs#2340
Closed
Bump the dotnet group with 6 updates zbalkan/docs#2341
Closed
Bump the dotnet group with 10 updates zbalkan/docs#2347
Open
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@ReubenBond
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.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.