feat(historian): honor per-alarm HistorizeToAveva opt-out at the durable write
This commit is contained in:
@@ -71,7 +71,13 @@ public sealed class HistorianAdapterActor : ReceiveActor
|
||||
// ShouldHistorize gate keeps only the Primary writing ⇒ exactly-once across the warm pair.
|
||||
// NOTE: Translate is intentionally inside the gate so Secondary/Detached nodes never allocate a
|
||||
// discarded AlarmHistorianEvent.
|
||||
Receive<AlarmTransitionEvent>(t => { if (ShouldHistorize()) _ = EnqueueAsync(Translate(t)); });
|
||||
// t.HistorizeToAveva=false is a per-alarm opt-out of DURABLE historization only — the live `alerts`
|
||||
// fan-out already happened upstream (the publish is NOT gated on this flag), so we gate the SINK
|
||||
// write here, not the publish. Rolling-restart-safe: the node that WRITES is always the same-version
|
||||
// node that PUBLISHED (Primary or boot window), so a cross-version old→new flow only reaches the
|
||||
// Secondary, which never writes — an old-format message deserializing HistorizeToAveva as the CLR
|
||||
// default (false) cannot drop a Primary's historization.
|
||||
Receive<AlarmTransitionEvent>(t => { if (ShouldHistorize() && t.HistorizeToAveva) _ = EnqueueAsync(Translate(t)); });
|
||||
|
||||
Receive<GetStatus>(_ => Sender.Tell(_sink.GetStatus()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user