PHOENIX-7797 Fixing flapper test HAGroupStoreClientIT.testHAGroupStoreClientWithMultiThreadedUpdates#2402
Merged
virajjasani merged 2 commits intoapache:masterfrom Apr 10, 2026
Merged
Conversation
added 2 commits
April 7, 2026 15:32
…ltiThreadedUpdates
virajjasani
approved these changes
Apr 9, 2026
virajjasani
pushed a commit
that referenced
this pull request
Apr 10, 2026
…eClientWithMultiThreadedUpdates (#2402)
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.
Jira: PHOENIX-7797
Fix flaky test
HAGroupStoreClientIT.testHAGroupStoreClientWithMultiThreadedUpdatesProblem
testHAGroupStoreClientWithMultiThreadedUpdatesfails intermittently (~21% failure rate over 100 runs) with:The test writes 5 versioned updates to the same ZK node from multiple threads and expects exactly 5
PathChildrenCacheListenerevents. However, all 5 writes complete within ~14ms, and Curator'sPathChildrenCachecoalesces rapid updates -- when a one-time ZK watch fires,getData()reads the latest value (skipping intermediate versions) before setting a new watch. This results in fewer events than writes, causing the fixed-counteventsLatchto time out.Fix
eventsLatch(threadCount)withfinalEventLatch(1): Instead of requiring exactly N events, wait for the event carrying the final version. This accommodates event coalescing while still ensuring all updates were processed.AtomicInteger. Any out-of-order delivery is recorded and asserted after the test completes.updateLatch.countDown()to afinallyblock: Previously, ifcreateOrUpdateDataOnZookeeperthrew an exception,countDown()was skipped and the exception was silently swallowed by the executor. Now the latch always decrements, and exceptions are captured and asserted separately.crrEventVersionsandorderingErrorsuseCollections.synchronizedList.executor.shutdown()andstoreClient.close()to prevent leaks.Test plan