-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Fix a flaky test for issue 19845 #20255
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
base: main
Are you sure you want to change the base?
Conversation
…after the merge. Signed-off-by: Joe Liu <[email protected]>
WalkthroughThis change refactors the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2025-12-02T22:44:14.799ZApplied to files:
🧬 Code graph analysis (1)server/src/test/java/org/opensearch/search/aggregations/startree/MultiTermsAggregatorTests.java (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
🔇 Additional comments (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #20255 +/- ##
============================================
- Coverage 73.20% 73.19% -0.02%
+ Complexity 71745 71742 -3
============================================
Files 5795 5795
Lines 328304 328304
Branches 47283 47283
============================================
- Hits 240334 240292 -42
- Misses 68663 68731 +68
+ Partials 19307 19281 -26 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@sandeshkr419 Can you take a look at this? |
sandeshkr419
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If NRT reader/writers are not available, are we still expecting the test to fail?
|
|
||
| // Force merge to ensure the star-tree structure is built | ||
| iw.forceMerge(1); | ||
| iw.close(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, close() performs an implicit commit() unless LiveIndexWriterConfig.commitOnClose is set to false. Can you check if we are deciding this randomly - in that case we can set this to be true.
Description
Fix a flaky test where the flake happening because DirectoryReader.open(directory) can rarely observe no committed segments yet, so ir.leaves() is empty and get(0) throws.
Related Issues
Resolves #19845
Check List
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.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.