-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Fix flaky CompletionStatsCacheTests.testCompletionStatsCache #19076
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
❌ Gradle check result for 90e2d75: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
@atris Can you rebase to get the fix for the failing tests? |
The test had a race condition where threads were calling start() twice on the CyclicBarrier - once inside getStats() and once from the main thread. This caused inconsistent synchronization and intermittent failures. Fixed by separating barrier synchronization from stats retrieval. Threads now explicitly call start() to wait on the barrier, then call getStatsOnly() to retrieve stats without additional synchronization. Fixes opensearch-project#18682 Signed-off-by: Atri Sharma <atri.jiit@gmail.com> #The test used a CyclicBarrier with 7 parties (6 threads + main thread) #which created unnecessary complexity. The main thread's participation in #the barrier was not needed and could cause timing issues. #Fixed by having only the 6 worker threads participate in the barrier for #synchronization. The main thread now simply starts the threads and waits #for them to complete via join(). This simplifies the synchronization model #and eliminates potential race conditions. #Fixes opensearch-project#18682
Done, thank you! |
|
❌ Gradle check result for 57be3b6: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
❌ Gradle check result for 57be3b6: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
Flaky test: |
|
❌ Gradle check result for 57be3b6: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #19076 +/- ##
============================================
- Coverage 72.98% 72.83% -0.16%
+ Complexity 69482 69402 -80
============================================
Files 5647 5647
Lines 319137 319137
Branches 46163 46163
============================================
- Hits 232907 232428 -479
- Misses 67391 67897 +506
+ Partials 18839 18812 -27 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…rch-project#19076) The test had a race condition where threads were calling start() twice on the CyclicBarrier - once inside getStats() and once from the main thread. This caused inconsistent synchronization and intermittent failures. Fixed by separating barrier synchronization from stats retrieval. Threads now explicitly call start() to wait on the barrier, then call getStatsOnly() to retrieve stats without additional synchronization. Fixes opensearch-project#18682 Signed-off-by: Atri Sharma <atri.jiit@gmail.com>
…rch-project#19076) The test had a race condition where threads were calling start() twice on the CyclicBarrier - once inside getStats() and once from the main thread. This caused inconsistent synchronization and intermittent failures. Fixed by separating barrier synchronization from stats retrieval. Threads now explicitly call start() to wait on the barrier, then call getStatsOnly() to retrieve stats without additional synchronization. Fixes opensearch-project#18682 Signed-off-by: Atri Sharma <atri.jiit@gmail.com>
…rch-project#19076) The test had a race condition where threads were calling start() twice on the CyclicBarrier - once inside getStats() and once from the main thread. This caused inconsistent synchronization and intermittent failures. Fixed by separating barrier synchronization from stats retrieval. Threads now explicitly call start() to wait on the barrier, then call getStatsOnly() to retrieve stats without additional synchronization. Fixes opensearch-project#18682 Signed-off-by: Atri Sharma <atri.jiit@gmail.com>
…rch-project#19076) The test had a race condition where threads were calling start() twice on the CyclicBarrier - once inside getStats() and once from the main thread. This caused inconsistent synchronization and intermittent failures. Fixed by separating barrier synchronization from stats retrieval. Threads now explicitly call start() to wait on the barrier, then call getStatsOnly() to retrieve stats without additional synchronization. Fixes opensearch-project#18682 Signed-off-by: Atri Sharma <atri.jiit@gmail.com>
…rch-project#19076) The test had a race condition where threads were calling start() twice on the CyclicBarrier - once inside getStats() and once from the main thread. This caused inconsistent synchronization and intermittent failures. Fixed by separating barrier synchronization from stats retrieval. Threads now explicitly call start() to wait on the barrier, then call getStatsOnly() to retrieve stats without additional synchronization. Fixes opensearch-project#18682 Signed-off-by: Atri Sharma <atri.jiit@gmail.com>
The test had a race condition where threads were calling start() twice
on the CyclicBarrier - once inside getStats() and once from the main
thread. This caused inconsistent synchronization and intermittent failures.
Fixed by separating barrier synchronization from stats retrieval. Threads
now explicitly call start() to wait on the barrier, then call getStatsOnly()
to retrieve stats without additional synchronization.
Fixes #18682
Signed-off-by: Atri Sharma atri.jiit@gmail.com
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.