diff --git a/src/ZB.MOM.WW.ScadaBridge.HealthMonitoring/CentralHealthReportLoop.cs b/src/ZB.MOM.WW.ScadaBridge.HealthMonitoring/CentralHealthReportLoop.cs index ab822374..bafe8366 100644 --- a/src/ZB.MOM.WW.ScadaBridge.HealthMonitoring/CentralHealthReportLoop.cs +++ b/src/ZB.MOM.WW.ScadaBridge.HealthMonitoring/CentralHealthReportLoop.cs @@ -9,9 +9,11 @@ namespace ZB.MOM.WW.ScadaBridge.HealthMonitoring; /// Periodically builds a SiteHealthReport for the central cluster itself /// (siteId = ) and feeds it into the local /// CentralHealthAggregator so the UI can render central as another card -/// on /monitoring/health. Only the cluster leader (Primary) generates -/// reports — the standby's aggregator catches up on failover when it -/// becomes Primary and starts its own loop. +/// on /monitoring/health. Only the active node (Primary = the **oldest Up +/// member**, i.e. the singleton host — IClusterNodeProvider.SelfIsPrimary, +/// never Akka cluster leadership) generates reports; the standby's aggregator +/// catches up on failover when it becomes the oldest and its loop starts +/// reporting. /// public class CentralHealthReportLoop : BackgroundService { @@ -41,8 +43,9 @@ public class CentralHealthReportLoop : BackgroundService private readonly HealthMonitoringOptions _options; private readonly ILogger _logger; - // Seeded with Unix-ms so reports from a newly-elected central leader - // always sort after reports from any prior leader for siteId="central". + // Seeded with Unix-ms so reports from a node that has newly become active + // (oldest Up member) always sort after reports from any previously-active + // node for siteId="central". // The clock is read through the injected TimeProvider so the seeding is // deterministically testable. private long _sequenceNumber;