fix: only active singleton node sends health reports
Both nodes of a site cluster were sending health reports. The standby node (without the DeploymentManager singleton) reported 0 instances and no connections, overwriting the active node's data in the aggregator. Added IsActiveNode flag to ISiteHealthCollector, set by DeploymentManagerActor on PreStart/PostStop. HealthReportSender skips sending when the node is not active. Also ensured EnsureDclConnections is called during startup batch creation so data connections survive container restarts.
This commit is contained in:
@@ -49,9 +49,10 @@ public class HealthReportSender : BackgroundService
|
||||
{
|
||||
try
|
||||
{
|
||||
// TODO: Wire S&F buffer depths when StoreAndForward service is available in DI
|
||||
// e.g., var depths = await _bufferDepthProvider.GetDepthsAsync();
|
||||
// _collector.SetStoreAndForwardDepths(depths);
|
||||
// Only the active node (running the DeploymentManager singleton) sends health reports.
|
||||
// The standby node has no instance/connection data and would overwrite the active's report.
|
||||
if (!_collector.IsActiveNode)
|
||||
continue;
|
||||
|
||||
var seq = Interlocked.Increment(ref _sequenceNumber);
|
||||
var report = _collector.CollectReport(_siteId);
|
||||
|
||||
Reference in New Issue
Block a user