feat(runtime): announce added nodes after the materialise passes on non-rebuild applies (R2-07 T4b)
This commit is contained in:
@@ -357,6 +357,16 @@ public sealed class OpcUaPublishActor : ReceiveActor, IWithTimers
|
||||
// values once the first dependency update arrives; until then variables show BadWaitingForInitialData.
|
||||
failedNodes += _applier.MaterialiseEquipmentVirtualTags(composition);
|
||||
|
||||
// R2-07 T4b — on a NON-rebuild apply (PureAdd / AttributeOnly), the Materialise passes above
|
||||
// just created exactly the added nodes WITHOUT tearing anything down, so announce them with a
|
||||
// Part 3 GeneralModelChangeEvent(NodeAdded) per affected parent — model-aware clients then
|
||||
// re-browse and pick up the new nodes while every existing MonitoredItem stays alive. Ordering
|
||||
// is correct by construction: Apply returned before the passes ran, and this announce runs after
|
||||
// them, so the nodes exist when clients re-browse. After a full rebuild the announcement is moot
|
||||
// (subscriptions are dead anyway) — the guard skips it. AnnounceAddedNodes is Safe-wrapped
|
||||
// internally, so a faulting announce can never break the deploy.
|
||||
if (!outcome.RebuildCalled) _applier.AnnounceAddedNodes(plan);
|
||||
|
||||
OtOpcUaTelemetry.OpcUaSinkWrite.Add(1, new KeyValuePair<string, object?>("kind", "rebuild"));
|
||||
if (outcome.RebuildFailed || failedNodes > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user