Add concurrent cold/expiry coverage for Gateway tag-presence cache #701
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?
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.
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.
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.