Add concurrent cold/expiry coverage for Gateway tag-presence cache #701

Closed
opened 2026-10-13 04:47:43 -04:00 by dohertj2 · 2 comments
Owner

Optional follow-up identified in the PR #699 review, not a correctness blocker or an unfulfilled requirement of #653.

GatewayTagPresenceCache bounds entries to 4,096 with a five-second negative and 60-second positive TTL. Dictionary access/capacity mutations are locked, but simultaneous cold or expired lookups can each issue a catalog RPC. The approved implementation does not promise single-flight coalescing.

Add deterministic concurrent cold/expiry tests to verify bounded capacity, correct results, and that faults/cancellation never become negative entries. Measure duplicate RPC cost before deciding whether to introduce per-tag request coalescing. If coalescing is useful, design cancellation ownership and eviction separately and preserve the existing fault/TTL contract. Record that concurrency coverage alone does not impose a one-RPC guarantee.

Optional follow-up identified in the PR #699 review, not a correctness blocker or an unfulfilled requirement of #653. GatewayTagPresenceCache bounds entries to 4,096 with a five-second negative and 60-second positive TTL. Dictionary access/capacity mutations are locked, but simultaneous cold or expired lookups can each issue a catalog RPC. The approved implementation does not promise single-flight coalescing. Add deterministic concurrent cold/expiry tests to verify bounded capacity, correct results, and that faults/cancellation never become negative entries. Measure duplicate RPC cost before deciding whether to introduce per-tag request coalescing. If coalescing is useful, design cancellation ownership and eviction separately and preserve the existing fault/TTL contract. Record that concurrency coverage alone does not impose a one-RPC guarantee.
Author
Owner

Approved tests-only implementation is ready in isolated test/historian-cache-concurrency: 15 deterministic overlapping cold/expiry/capacity/fault/cancellation cases, production cache unchanged. Newclass15/15 and Gatewayproject449/449 pass; independent review found no actionable defects. Synthetic16caller cold/expiry bursts produced16RPCs, without making that count a guarantee.

Full solution first run: 14,614 passed,609skipped,1failure across62suites. Failure is existing OpcUaClientDriverReconnectWireTests.A_server_restart_goes_Bad_then_the_watchdog_reinit_brings_the_value_back_Good; immediate isolated retry passed1/1. New intermittent verification issue #702 tracks the unresolved root cause. A full repeat with detailed console failure logging is running. This issue remains open and changes uncommitted until full validation is resolved.

Approved tests-only implementation is ready in isolated test/historian-cache-concurrency: 15 deterministic overlapping cold/expiry/capacity/fault/cancellation cases, production cache unchanged. Newclass15/15 and Gatewayproject449/449 pass; independent review found no actionable defects. Synthetic16caller cold/expiry bursts produced16RPCs, without making that count a guarantee. Full solution first run: 14,614 passed,609skipped,1failure across62suites. Failure is existing OpcUaClientDriverReconnectWireTests.A_server_restart_goes_Bad_then_the_watchdog_reinit_brings_the_value_back_Good; immediate isolated retry passed1/1. New intermittent verification issue #702 tracks the unresolved root cause. A full repeat with detailed console failure logging is running. This issue remains open and changes uncommitted until full validation is resolved.
Author
Owner

Merged PR #703 after independent review and a full detailed-logger rerun:14,615passed/609skipped/0failed across62suites, exit0. Gateway449passed; new concurrency15passed. Production cache unchanged, no single-flight guarantee. First full run failed an existing reconnect test; isolated and full repeats passed. #702 remains open for that intermittent failure. Evidence: docs/plans/2026-10-13-cache-concurrency-results.md. No deployment changes.

Merged PR #703 after independent review and a full detailed-logger rerun:14,615passed/609skipped/0failed across62suites, exit0. Gateway449passed; new concurrency15passed. Production cache unchanged, no single-flight guarantee. First full run failed an existing reconnect test; isolated and full repeats passed. #702 remains open for that intermittent failure. Evidence: docs/plans/2026-10-13-cache-concurrency-results.md. No deployment changes.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#701