HistoryRead returns BadHistoryOperationUnsupported when the historian backend is unreachable (should be a retryable communication status) #697
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?
Found by the #692–#694 live AVEVA gate (2026-10-13). A ~2 minute VPN drop hit one run. Pre-existing; affects every historian backend. Low/medium.
Symptom: while the backend (here the HistorianGateway → AVEVA path) is unreachable, HistoryRead Raw/Modified answers
BadHistoryOperationUnsupported. That tells clients the node has no history at all and they should stop asking. The real condition is a transient outage they should retry (e.g.BadNoCommunication/BadServerNotConnected/BadCommunicationError, whichever matches the existing driver comms-loss contract).Where: the generic exception handler on the raw and modified-read paths in
OtOpcUaNodeManagermaps any backend exception toBadHistoryOperationUnsupported. Check the AtTime / Processed / Events paths too.Fix sketch:
RpcExceptionUnavailable/DeadlineExceeded,SqlExceptionconnection errors, socket errors) versus genuinely unsupported.BadHistoryOperationUnsupportedfor real unsupported cases.Check ScadaBridge's handling of history status codes before changing — consumer impact.
Evidence: scratchpad
g692/l692-vpn-drop-0600Z.log.Implemented actual transport-outage classification across Raw, Modified, Processed, AtTime and Events: BadNoCommunication. Gateway package/nested gRPC outages and SQL Server/QuestDB connection failures are wrapped consistently at the backend boundary. Unsupported operations retain BadHistoryOperationUnsupported; server cancellation retains BadTimeout. Tests check SDK service/result statuses, nested gRPC errors and repeated real refused database connections. ScadaBridge source/tests contain no HistoryRead consumer. Ready in the pushed branch; this issue closes when PR #699 merges.
Pushed commit
97668d26; PR: #699.Full solution verified: 14,581 passed, 609 skipped, 0 failed across 62 suites (
dotnet test ZB.MOM.WW.OtOpcUa.slnx --verbosity quiet, exit 0). Independent final review found no important defects. New fixes have not been deployed or live-tested end to end through OPC UA.