Skip to content

Add regression test for the ServiceEcaUtil cache race - #1807

Merged
ashishvijaywargiya merged 2 commits into
apache:trunkfrom
ashishvijaywargiya:test/service-eca-util-race-regression
Aug 29, 2026
Merged

Add regression test for the ServiceEcaUtil cache race#1807
ashishvijaywargiya merged 2 commits into
apache:trunkfrom
ashishvijaywargiya:test/service-eca-util-race-regression

Conversation

@ashishvijaywargiya

Copy link
Copy Markdown
Contributor

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.

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.
@ashishvijaywargiya
ashishvijaywargiya merged commit da5c51f into apache:trunk Aug 29, 2026
9 of 13 checks passed
@ashishvijaywargiya
ashishvijaywargiya deleted the test/service-eca-util-race-regression branch August 29, 2026 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant