Telemetry: evict a driver's snapshot-cache entries when the instance is removed #609

Closed
opened 2026-10-08 02:31:13 -04:00 by dohertj2 · 1 comment
Owner

_healthCache/_resilienceCache are never evicted, so a decommissioned driver instance's last Health/Resilience is replayed to every new /hosts subscriber forever ("pre-production, accepted for now").
Sources: src/Server/ZB.MOM.WW.OtOpcUa.Runtime/Telemetry/TelemetryLocalHub.cs:40-42 (TODO(mesh-phase5+)); deferment.md §4.1.

  • Driver-lifecycle hook (instance removed / respawned under a new id) evicts the entries
  • Test: remove instance, subscribe, assert no replay

Filed 2026-10-08 by the pending/deferred-work sweep after the #562–#591 issue sweep.

`_healthCache`/`_resilienceCache` are never evicted, so a decommissioned driver instance's last Health/Resilience is replayed to every new `/hosts` subscriber forever ("pre-production, accepted for now"). Sources: src/Server/ZB.MOM.WW.OtOpcUa.Runtime/Telemetry/TelemetryLocalHub.cs:40-42 (`TODO(mesh-phase5+)`); deferment.md §4.1. - [ ] Driver-lifecycle hook (instance removed / respawned under a new id) evicts the entries - [ ] Test: remove instance, subscribe, assert no replay _Filed 2026-10-08 by the pending/deferred-work sweep after the #562–#591 issue sweep._
Author
Owner

Resolved on master (53247a05 merge 93e38156; 8a9bf230 in merge b99aea46; 4a10ea1e merge b9e6802d).

  • Driver-removal hook evicts the hub's health/resilience snapshot entries (TelemetryLocalHub, ITelemetryLocalHub); the removed driver's resilience tracker state is released as well so the publisher stops re-emitting it.
  • Tests: remove an instance, subscribe, assert no replay (TelemetryLocalHubTests, DriverHostActorUnreadableArtifactTests).
  • Review race closed in 4a10ea1e: a removed driver's late in-flight invoker calls or health emits can no longer resurrect that state (tombstones on the tracker and hub, Retire/Reinstate, Evict/Readmit). The tombstone note is in CLAUDE.md. The TODO(mesh-phase5+) is gone.

Closed 2026-10-08 by the hardware-available issue sweep (master d898262c).

Resolved on master (53247a05 merge 93e38156; 8a9bf230 in merge b99aea46; 4a10ea1e merge b9e6802d). - [x] Driver-removal hook evicts the hub's health/resilience snapshot entries (`TelemetryLocalHub`, `ITelemetryLocalHub`); the removed driver's resilience tracker state is released as well so the publisher stops re-emitting it. - [x] Tests: remove an instance, subscribe, assert no replay (`TelemetryLocalHubTests`, `DriverHostActorUnreadableArtifactTests`). - Review race closed in 4a10ea1e: a removed driver's late in-flight invoker calls or health emits can no longer resurrect that state (tombstones on the tracker and hub, Retire/Reinstate, Evict/Readmit). The tombstone note is in CLAUDE.md. The TODO(mesh-phase5+) is gone. *Closed 2026-10-08 by the hardware-available issue sweep (master d898262c).*
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#609