Files
lmxopcua/docs/plans/2026-10-13-historian-695-698-results.md
T
Joseph Doherty 97668d26d3
v2-ci / build (pull_request) Successful in 5m10s
v2-ci / unit-tests (pull_request) Failing after 28m34s
fix(historian): respect gateway ceilings and history value contracts
2026-10-13 03:51:04 -04:00

3.0 KiB
Raw Blame History

Historian follow-up results — 2026-10-13

Scope: approved bounded fixes for #695–#698, plus live measurement of #653. Base: 66a2b0c3.

  • #695: spend the remaining learned-ceiling room on crowding reads; reduce crowded reverse-read windows using the observed pre-window count. Regression cases cover ceilings 1,709 and 1,369, and reverse paging through a crowded millisecond.
  • #696 item 1: probe the future interval before starting the prior-sample search near now. Preserve stored future samples, requested timestamps and Uncertain status. Dense future probes still use the existing bounded walk. Items 2 and 3 remain open (stopped-tag strict-ceiling cost and aggregate ceiling re-probes).
  • #697: actual Gateway, SQL Server and QuestDB transport failures become BadNoCommunication on every HistoryRead arm. Cancellation remains BadTimeout; unsupported operations retain BadHistoryOperationUnsupported. Tests include real refused database connections, repeated reads and nested gRPC failures.
  • #698: normalize Raw, Modified and AtTime scalar values to the node DataType. Conversion failure gives per-sample null/BadTypeMismatch; arrays, audit metadata and timestamps survive. Processed results retain aggregate-specific types.
  • #694 item 3 remains blocked on historiangw#27. No upstream code was changed.

Live #653 measurement

Five sequential calls per operation and tag, using client 0.3.0 against the running local gateway (localhost:5221) with its existing remote AVEVA connection. Commissioned a two-hour historian:read key, then revoked it after measurement. No historian writes or provisioning performed.

Operation SysTimeSec, elapsed ms Nonexistent tag, elapsed ms
Metadata 299, 85, 81, 82, 48 (success) 89, 53, 41, 77, 76 (gateway exception)
Raw 143, 99, 145, 133, 159 (success) 30260, 30634, 30675, 30754, 30628 (gateway exception)
Aggregate 271, 275, 309, 249, 304 (success) 30564, 30605, 30583, 30575, 30806 (gateway exception)
AtTime 140, 88, 89, 127, 92 (success) 61074, 61330, 61601, 61249, 61271 (gateway exception)

Nonexistent tag: OtOpcUa.Issue653.Nonexistent.20261013. The delay is still present. Recommend a metadata pre-check with a short negative cache, caching only explicit missing-tag outcomes and never authentication, communication or arbitrary errors. This is follow-up implementation; #653 remains open. Direct gateway AtTime above differs from OtOpcUa's raw-based AtTime evaluator.

Consumer and validation notes

ScadaBridge source and tests contain no HistoryRead consumer; no consumer change required. Independent review found a future-stored-sample edge case, which was fixed and covered before final verification. No deployment or live end-to-end OPC UA verification of these new fixes is claimed; the live run measures #653 through the gateway client.

Full solution: 14,581 passed, 609 skipped, 0 failed across 62 test suites. Command: dotnet test ZB.MOM.WW.OtOpcUa.slnx --verbosity quiet, exit 0. Skips include environment-gated integration suites.