feat(mesh-phase4): DriverHostActor runs ConfigDb-free (LocalDb alarm store, guarded acks)
Nullable ConfigDb factory; UpsertNodeDeploymentState no-ops when absent (central persists acks from the ApplyAck); scripted-alarm condition state served from the LocalDb store instead of the ConfigDb-backed Ef store. Combines Phase-4 Tasks 4 + 6. Removes the interim dbFactory! cast. Claude-Session: https://claude.ai/code/session_01GASWkNEi68FSCtvr6rLoEW
This commit is contained in:
@@ -2,7 +2,9 @@ using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using ZB.MOM.WW.LocalDb;
|
||||
using ZB.MOM.WW.LocalDb.Replication;
|
||||
using ZB.MOM.WW.OtOpcUa.Core.ScriptedAlarms;
|
||||
using ZB.MOM.WW.OtOpcUa.Runtime.DeploymentCache;
|
||||
using ZB.MOM.WW.OtOpcUa.Runtime.ScriptedAlarms;
|
||||
|
||||
namespace ZB.MOM.WW.OtOpcUa.Host.Configuration;
|
||||
|
||||
@@ -96,6 +98,13 @@ public static class LocalDbRegistration
|
||||
// replicating, and never written to.
|
||||
services.AddSingleton<IDeploymentArtifactCache, LocalDbDeploymentArtifactCache>();
|
||||
|
||||
// Per-cluster mesh Phase 4: scripted-alarm condition state served from the replicated LocalDb
|
||||
// store instead of the ConfigDb-backed EF store, so a driver-only node (no ConfigDb) keeps its
|
||||
// Part 9 condition state and mirrors it to its pair peer. Driver-role only, alongside the cache —
|
||||
// admin-only nodes never register LocalDb. WithOtOpcUaRuntimeActors resolves it optionally and
|
||||
// threads it into DriverHostActor's ScriptedAlarm engine. Singleton to match ILocalDb + the cache.
|
||||
services.AddSingleton<IAlarmStateStore, LocalDbAlarmConditionStateStore>();
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user