Merge #995: alarm predicates compiled once outside the gate, node-indexed stood-down items, kept drivers not re-subscribed, artifact parsed once, VirtualTag/Calculation evaluation coalesced
This commit is contained in:
+18
-1
@@ -188,7 +188,7 @@ routes it to `Unsubscribe`, dropping a stale handle.)
|
||||
|
||||
| Route | Trigger | What re-provisions it |
|
||||
|---|---|---|
|
||||
| **Deploy reconcile** | `ApplyDriverSpecs` → `SpawnChild` | `SpawnChild` sends `InitializeRequested` then the desired set; the apply's bulk push then sends the (freshly rebuilt) set to every child. |
|
||||
| **Deploy reconcile** | `ApplyDriverSpecs` → `SpawnChild` | `SpawnChild` sends `InitializeRequested` then the desired set; the apply's bulk push then sends the (freshly rebuilt) set to every child **that needs it** (#995, below). |
|
||||
| **Operator Restart** | `/hosts` → Restart → `HandleRestartDriver` | Stops the child, respawns from the cached spec — and `SpawnChild` sends the desired set, because it always does. **This is the 03/S16 fix**: there is no bulk push on this path, and before it the respawned child subscribed to nothing until the next deployment. |
|
||||
| **Supervision restart** | a child throws ⇒ Akka's **default decider** ⇒ `Restart` | `DriverInstanceActor.PostRestart` Tells the host `ReprovisionRequested`; `HandleReprovisionRequested` logs a Warning naming the crash type, re-sends `InitializeRequested` (non-stub children) and the desired set. |
|
||||
| **Force Reconnect** | `/hosts` → Force Reconnect → `HandleReconnectDriver` | **Nothing — verified.** It Tells `ForceReconnect` to the *same* child actor, so the instance and its `_desiredRefs`/`_desiredAlarmRefs` survive and the reconnect's Connected entry re-applies them itself. Pinned by `Force_reconnect_keeps_the_desired_set_and_re_subscribes` so a future edit to the restart paths cannot break the one that was already correct. |
|
||||
@@ -252,6 +252,23 @@ Things to know before touching any of this:
|
||||
re-subscribing** so a filtering driver does not accumulate two overlapping ones. There is still
|
||||
deliberately no unsubscribe-on-**empty**: a removed alarm tag's condition node is torn down on the
|
||||
address-space rebuild and `ForwardNativeAlarm` drops any transition whose `ConditionId` no longer maps.
|
||||
- **A deploy no longer re-subscribes an untouched driver (#995, review 2026-12-02 R-11).** A re-subscribe tears down
|
||||
the driver's whole data subscription (OpcUaClient monitored items, Galaxy advise through mxaccessgw, a forced
|
||||
full re-read) and leaves a gap; on a kept driver whose set did not change its only job is **seeding** — the
|
||||
initial values it produces give a node or consumer that is new since the last apply its first value. So the
|
||||
deploy path (`HandleArtifactForApply` → `ApplyDesiredSubscriptions(skipUnchanged: true)`) skips a child only when
|
||||
ALL hold: it is the child that already got a plain (non-acquisition) set from this host (`_plainPushedTo` — a
|
||||
respawn is a new actor and is always pushed); its **seeding fingerprint** is unchanged (value refs, each ref's
|
||||
fan-out NodeIds — raw + every referencing UNS mirror, so an added/re-pointed mirror re-pushes — its
|
||||
historization, and the alarm refs); and none of its value refs **entered the mux-consumer set** (enabled
|
||||
VirtualTag / scripted-alarm deps + every hosted `IDependencyConsumer` driver's refs — the mux replays a retained
|
||||
value only for refs a replay-opting subscriber already named). A **full rebuild** recreates every node without a
|
||||
value, and only the publish actor knows whether the apply was one, so skipped drivers are held per correlation and
|
||||
re-pushed when `RebuildCompleted.AddressSpaceRebuilt` (additive, default `true`) or `Degraded` says so, when the
|
||||
outcome times out, or when the apply throws. Boot/restore applies still push every child. Pinned by
|
||||
`DriverHostActorUnchangedResubscribeTests` (absence + mirror / VirtualTag / rebuild / degraded positive controls).
|
||||
⚠️ A NEW kind of value consumer (something that registers driver refs with the mux and needs a first value) must
|
||||
join `ConsumerRefs`, or its first deploy leaves it waiting for the next value change.
|
||||
- ⚠️ **A data re-subscribe must not touch the alarm feed (#662).** Every deploy's bulk push re-sends
|
||||
`SetDesiredSubscriptions` to every kept driver, and `HandleSubscribeAsync` drops the prior DATA
|
||||
subscription first. That teardown used to be the full `DetachSubscription`, which also unhooked
|
||||
|
||||
Reference in New Issue
Block a user