gRPC data: a projected monitored item refused inside the item manager faults the whole CreateMonitoredItems request #961

Closed
opened 2026-12-01 19:56:14 -05:00 by dohertj2 · 1 comment
Owner

Found while fixing #940.

OrdinaryTagItemManager.CreateMonitoredItem (WarmStandby.cs) throws ServiceResultException(BadUserAccessDenied) when TryAcquireProjectedItem fails. SDK 2.0.1 CustomNodeManager2.CreateMonitoredItems calls it under Lock with no catch, so the exception becomes a service fault for the whole request — every other item in the batch (ScadaBridge creates many per call) fails with it.

#940 moved the known refusals (ACL denial, lapse) to a per-item classification in OtOpcUaNodeManager.CreateMonitoredItems before the SDK create, so this now only happens on the remainder: the authority changing between that probe and the create, and StartSubscription refusing (stream capacity MaxStreams, a closing cohort). Those should also be per-item statuses (e.g. BadTooManyMonitoredItems / BadResourceUnavailable), e.g. by overriding the protected CreateMonitoredItem to return the status instead of throwing.

Found while fixing #940. `OrdinaryTagItemManager.CreateMonitoredItem` (`WarmStandby.cs`) throws `ServiceResultException(BadUserAccessDenied)` when `TryAcquireProjectedItem` fails. SDK 2.0.1 `CustomNodeManager2.CreateMonitoredItems` calls it under `Lock` with no catch, so the exception becomes a **service fault for the whole request** — every other item in the batch (ScadaBridge creates many per call) fails with it. #940 moved the known refusals (ACL denial, lapse) to a per-item classification in `OtOpcUaNodeManager.CreateMonitoredItems` before the SDK create, so this now only happens on the remainder: the authority changing between that probe and the create, and `StartSubscription` refusing (stream capacity `MaxStreams`, a closing cohort). Those should also be per-item statuses (e.g. `BadTooManyMonitoredItems` / `BadResourceUnavailable`), e.g. by overriding the protected `CreateMonitoredItem` to return the status instead of throwing.
dohertj2 added the type:bugpriority:p3 labels 2026-12-01 19:56:14 -05:00
Author
Owner

Fixed in 75e6ff9af (merged to master, not yet pushed); evidence docs/plans/evidence/grpc-data-ext/960-961.md (4x250 ms maxAge=0 reads: 1016 ms -> 285 ms). Post-merge: Runtime DataConnections 1010/1010, OpcUaServer.Tests 1460/2 skip, OpcUaServer.IntegrationTests GrpcData 39/39, Host 210/210, solution build clean. Not yet run on the gRPC data rig (rides #915).

Fixed in 75e6ff9af (merged to master, not yet pushed); evidence docs/plans/evidence/grpc-data-ext/960-961.md (4x250 ms maxAge=0 reads: 1016 ms -> 285 ms). Post-merge: Runtime DataConnections 1010/1010, OpcUaServer.Tests 1460/2 skip, OpcUaServer.IntegrationTests GrpcData 39/39, Host 210/210, solution build clean. Not yet run on the gRPC data rig (rides #915).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#961