perf(adminui): pooled DbContext factory; role-grants reads per-call, not per-circuit
This commit is contained in:
@@ -201,6 +201,10 @@ public sealed class ScriptedAlarmHostActor : ReceiveActor
|
||||
Receive<ApplyScriptedAlarms>(OnApply);
|
||||
Receive<AlarmsLoaded>(OnAlarmsLoaded);
|
||||
Receive<VirtualTagActor.DependencyValueChanged>(OnDependencyChanged);
|
||||
// The mux's batched delivery: one message carrying this host's whole matched slice of a driver
|
||||
// burst. The engine upstream is fed per value, so push each item in order — the saving is the
|
||||
// mailbox hop, not the push.
|
||||
Receive<VirtualTagActor.DependencyValueBatch>(OnDependencyBatch);
|
||||
Receive<EngineEmission>(OnEngineEmission);
|
||||
// Cluster redundancy snapshots (published on the `redundancy-state` topic, subscribed in PreStart)
|
||||
// cache this node's role so OnEngineEmission can gate the cluster-wide alerts publish to the Primary.
|
||||
@@ -395,6 +399,17 @@ public sealed class ScriptedAlarmHostActor : ReceiveActor
|
||||
new DataValueSnapshot(msg.Value, msg.StatusCode, msg.TimestampUtc, msg.TimestampUtc));
|
||||
}
|
||||
|
||||
/// <summary>One batched mux delivery — every item already matched this host's registered interest.
|
||||
/// Loops the per-value handler, preserving in-burst order.</summary>
|
||||
private void OnDependencyBatch(VirtualTagActor.DependencyValueBatch msg)
|
||||
{
|
||||
var items = msg.Items;
|
||||
for (var i = 0; i < items.Count; i++)
|
||||
{
|
||||
OnDependencyChanged(items[i]);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnEngineEmission(EngineEmission msg)
|
||||
{
|
||||
var e = msg.Event;
|
||||
|
||||
Reference in New Issue
Block a user