OpcUaClient session loss (#670) follow-ups: TCP-stall proxy test, ReconnectPeriod field, recovery latency, drop observability #676
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-ups from #670 (OpcUaClient session loss).
docker pauseof opc-plc).ReconnectPeriodfield (the SDKSessionReconnectHandleris deleted) — remove it.Serilog__MinimumLevel__*env overrides produced no Debug lines on the docker-dev rig, andstale_notification_droppedis OTel-only, so replay-guard drops were unobservable on the rig. Fix the log-level override path or add an Information-level per-recovery drop summary.Done — merged to master (
50c09e21, live-gate fix6d5c1c76).TcpStallProxy+OpcUaClientDriverStallWireTests(in-process server): stall → oneBadNoCommunication, frozenLastSuccessfulRead→ resume ⇒ same session, Healthy, value republished Good, later change arrives, no source-timestamp regression (waits for the SDK's late backlog flush so the check can't pass vacuously). It needed a driver fix first: the driver now rewrites the advertised endpoint's host and port to the configured URL (SDKSelectEndpointbehaviour; port kept when the URL has none) — also fixes upstreams behind NAT/port maps. The test also found a real defect, fixed: a value change riding a Publish in flight across the stall was lost for good; a trailing re-readTimeout + KeepAliveIntervalafter an in-place recovery repairs it (incl. Good→Bad), serialized with live delivery by a per-ref delivery sequence so it can never land an older value over a newer one.ReconnectPeriodremoved everywhere (options, AdminUI form, docs, tests); stored JSON carrying it still parses (factory, probe, browser).IDriverConnectionLossSource(Core.Abstractions). OpcUaClient raises it once per session on a definitive loss — session statuses,BadServerHalted, a server-reported subscription loss, or a sustained closed secure channel (2nd consecutiveBadSecureChannelClosed/BadConnectionClosedkeep-alive failure: reproduced in-process, the SDK never reopens a closed channel once the reconnect handler is gone).DriverInstanceActorturns it into an immediate re-initialise while Connected. Ambiguous stall statuses (BadNoCommunication,BadRequestTimeout) and the publishing-stall heuristic still go through the #527 watchdog.docker-dev/docker-compose.debug.ymlraises per-category levels (verified to reach actor Debug lines); the earlier "env override doesn't work" was operational, not a code defect.Live gates (docker-dev, opc-plc):
50c09e21: a real process stop yieldsBadSecureChannelClosed→BadConnectionClosed, not on the definitive list ⇒ still ~122 s. Fixed in6d5c1c76.6d5c1c76) PASS:docker restart×2 ⇒ first Good 12.9 s / 14.2 s (was ~122 s); SIGINT stop ⇒ ConnectionLost in 7 s, Good ~27 s after the server came back (opc-plc boot + one reconnect interval);docker kill⇒ ConnectionLost in 5 s, Good ~25 s after restart (was 98–127 s).docker pauseblips (2×2, 20 s) still recover in place (no ConnectionLost, no re-init): oneBadNoCommunicationper outage per node, 0 regressions/equal repeats, summary line on all 8. One re-init per outage, watchdog never fired.Known gap (documented): a definitive loss raised while the actor is not Connected (e.g. during init) is not deferred — that session falls back to the watchdog.