Resolve all 46 low-severity architecture review findings
This commit is contained in:
@@ -561,18 +561,10 @@ akka {{
|
||||
// 30 s timeout, so it could only add a hop and latency to every audit batch.
|
||||
centralControlGrpc?.SetAuditIngestActor(auditIngest.Proxy);
|
||||
|
||||
// Hand the proxy to the SiteStreamGrpcServer (if registered on this node)
|
||||
// so the IngestAuditEvents RPC routes incoming site batches to the singleton.
|
||||
// The gRPC server is currently only registered on Site nodes; on a central
|
||||
// node this resolves to null and the wiring is a no-op unless a future
|
||||
// central-hosted gRPC server (or a real site→central client) is added.
|
||||
var grpcServer = _serviceProvider.GetService<ZB.MOM.WW.ScadaBridge.Communication.Grpc.SiteStreamGrpcServer>();
|
||||
grpcServer?.SetAuditIngestActor(auditIngest.Proxy);
|
||||
|
||||
_logger.LogInformation(
|
||||
"AuditLogIngestActor singleton created (control-plane bound: {ControlBound}, "
|
||||
+ "site-stream server bound: {GrpcBound})",
|
||||
centralControlGrpc is not null,
|
||||
grpcServer is not null);
|
||||
"AuditLogIngestActor singleton created (control-plane bound: {ControlBound})",
|
||||
centralControlGrpc is not null);
|
||||
|
||||
// Subscribe the per-site stalled
|
||||
// telemetry tracker to the actor system EventStream NOW that the
|
||||
|
||||
@@ -121,8 +121,10 @@ public sealed class ClusterBootstrapCoordinator : IHostedService
|
||||
return;
|
||||
}
|
||||
|
||||
ct.ThrowIfCancellationRequested();
|
||||
var cluster = Akka.Cluster.Cluster.Get(_system());
|
||||
var addresses = order.Select(Address.Parse).ToArray();
|
||||
ct.ThrowIfCancellationRequested();
|
||||
cluster.JoinSeedNodes(addresses);
|
||||
|
||||
// Peer-first is a one-way commitment: JoinSeedNodeProcess never self-forms. If the founder
|
||||
@@ -184,7 +186,7 @@ public sealed class ClusterBootstrapCoordinator : IHostedService
|
||||
if (await TryConnectAsync(host, port, ct).ConfigureAwait(false)) return true;
|
||||
if (sw.Elapsed >= window) return false;
|
||||
try { await Task.Delay(interval, ct).ConfigureAwait(false); }
|
||||
catch (OperationCanceledException) { return false; }
|
||||
catch (OperationCanceledException) when (ct.IsCancellationRequested) { throw; }
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user