GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat(membership): retain local health history by ReubenBond · Pull Request #10502 · dotnet/orleans Conversation
|
| 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. |
Tip
Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
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);
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 63571f45-a79f-49f9-a50e-296c1355e312
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 63571f45-a79f-49f9-a50e-296c1355e312
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 63571f45-a79f-49f9-a50e-296c1355e312
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 63571f45-a79f-49f9-a50e-296c1355e312
85c5aae to
d76a87a
Compare
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 63571f45-a79f-49f9-a50e-296c1355e312
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
src/Orleans.Runtime/MembershipService/SiloHealthMonitor.cs:296
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
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!)];
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.