perf(worker): alarm watch-list update diffs the subtag standby instead of rebuilding it (MXA-010, #258)
UpdateAlarmWatchList rebuilt the standby: a second MXAccess registration, an AddItem/Advise for every watched subtag, then an Unregister of the old source — work proportional to the whole list for a one-alarm change (reproduced by the previous commit's test). The subtag standby now takes the list as a diff: added alarms' subtags are advised on the existing source, removed alarms' subtags are unadvised, and unchanged alarms keep their advice and state. The update stays all-or-nothing: the list is validated and the additions advised before the swap, and an advise failure unadvises what it added and keeps the previous list. A changed target starts fresh and is initialised from the last delivered subtag values (acked/priority before active, MXA-007; bad quality still ignored, MXA-005). LmxSubtagAlarmSource tracks an item from AddItem so an Advise failure is retryable and removable.
This commit is contained in:
+5
-3
@@ -45,9 +45,11 @@ The shared alarm command model includes `SubscribeAlarms` and
|
||||
initial watch list explicitly fallback-capable, allowing discovery recovery to
|
||||
populate a standby without restarting the primary alarm-manager subscription.
|
||||
`UpdateAlarmWatchListCommand.watch_list` is the complete replacement list. The
|
||||
worker prepares the replacement on its STA before swapping it into the existing
|
||||
failover consumer and returns a normal `MxCommandReply`; callers must treat only
|
||||
`protocol_status = OK` as acknowledgement of the new list.
|
||||
worker applies it to the existing failover consumer's standby as a diff on its
|
||||
STA (advising added alarms, unadvising removed ones, keeping unchanged alarms'
|
||||
state) and returns a normal `MxCommandReply`; a failed update leaves the previous
|
||||
list in force. Callers must treat only `protocol_status = OK` as acknowledgement
|
||||
of the new list.
|
||||
|
||||
`AcknowledgeAlarmRequest` carries the operator's identity: `operator_user`
|
||||
(required), `operator_password` (field 6) and `operator_domain` (field 7). The
|
||||
|
||||
Reference in New Issue
Block a user