fix(communication): malformed site gRPC address keeps the old channel, never aborts the refresh tick or restarts CentralCommunicationActor (review 2026-10-21 03/R-1)

This commit is contained in:
Joseph Doherty
2026-10-22 06:14:34 -04:00
parent 0fd9bcbce6
commit b0a97a4b67
5 changed files with 261 additions and 8 deletions
@@ -392,8 +392,19 @@ public class CentralCommunicationActor : ReceiveActor
private void HandleSiteAddressCacheLoaded(SiteAddressCacheLoaded msg)
{
// Per-site transport resource reconciliation (build/drop gRPC channel
// pairs). Runs on the actor thread each refresh tick.
_transport.ReconcileSites(msg);
// pairs). Runs on the actor thread each refresh tick. Guarded (review 2026-10-21 03/R-1):
// a throw here would restart this actor, whose PreStart re-reads the Sites table at
// TimeSpan.Zero — a restart loop for as long as a bad row persists — and would skip the
// aggregator prune below.
try
{
_transport.ReconcileSites(msg);
}
catch (Exception ex)
{
_log.Error(ex, "Reconciling site gRPC channels from the refreshed address cache failed; "
+ "existing channels are kept until the next refresh");
}
// Self-healing eviction: a site deleted from configuration would otherwise
// linger in the aggregator as a permanently-offline tile (and live KPI