Add regression test for the ServiceEcaUtil cache race - #1807
Merged
ashishvijaywargiya merged 2 commits intoAug 29, 2026
Merged
Conversation
Drives addEcaDefinitions() writers and an evalRules() reader concurrently against the same service/event, using duplicate-equal rules so every write hits the remove-then-add dedup path. Verified this fails against the pre-fix ServiceEcaUtil.java (bf5e6bb) with a ConcurrentModificationException, and passes against the fix from PR apache#1805.
The 20s per-future wait and 30s overall @timeout were sized against a fast, idle dev machine. The test method took ~12s locally on 10 idle cores with all writers serialized on CONFIG_LOCK, leaving little margin for GitHub Actions' shared/throttled runners, which timed out the check on both build (17) and build (21) in PR apache#1807 with no corruption or assertion failure logged - a false-positive timeout, not a reproduction of the race. Bump the per-future wait to 90s and the outer timeout to 120s so a slow-but-healthy CI run isn't misreported as a failure, while still catching a genuine hang. The workload (writer/reader thread counts, merges per writer) is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Drives addEcaDefinitions() writers and an evalRules() reader concurrently against the same service/event, using duplicate-equal rules so every write hits the remove-then-add dedup path. Verified this fails against the pre-fix ServiceEcaUtil.java (bf5e6bb) with a ConcurrentModificationException, and passes against the fix from PR #1805.