Skip to content
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

[Flaky Test] Fix Flaky Test SearchTimeoutIT.testSimpleTimeout #16828

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kkewwei
Copy link
Contributor

@kkewwei kkewwei commented Dec 11, 2024

Description

When numDocs=1000:

  1. The testSimpleTimeout will cost several minutes, when scoring each doc, it will cost 500ms, it's a long time to iterating all the doc in queryphase.
  2. ReaderContext is created before executing queryphase and released after the fetchphase.
  3. the life time of ReaderContext is 1min(determined by search.keep_alive_interval)
  4. If queryPhase costs too much time, the ReaderContext may be released before fetchphase, so the fetch/Id will be failed, which hit the case.
    image

Related Issues

Resolves #16056 #9401

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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.

Copy link
Contributor

✅ Gradle check result for 51c35eb: SUCCESS

Copy link

codecov bot commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.01%. Comparing base (5ba909a) to head (d1fc8be).
Report is 10 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #16828      +/-   ##
============================================
- Coverage     72.11%   72.01%   -0.11%     
+ Complexity    65237    65185      -52     
============================================
  Files          5318     5318              
  Lines        304003   304011       +8     
  Branches      43992    43993       +1     
============================================
- Hits         219228   218925     -303     
- Misses        66874    67161     +287     
- Partials      17901    17925      +24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

❌ Gradle check result for d1fc8be: 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?

@kkewwei
Copy link
Contributor Author

kkewwei commented Dec 13, 2024

❌ Gradle check result for d1fc8be: 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?

SpecificClusterManagerNodesIT.testElectOnlyBetweenClusterManagerNodes #15944

@kkewwei
Copy link
Contributor Author

kkewwei commented Dec 16, 2024

@reta @jed326, please have a look when you are free.

Copy link
Collaborator

@jed326 jed326 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kkewwei this was a great find!

@jed326 jed326 added the backport 2.x Backport to 2.x branch label Dec 16, 2024
@reta
Copy link
Collaborator

reta commented Dec 16, 2024

@reta @jed326, please have a look when you are free.

Thanks @kkewwei , I am actually a bit surprised by your findings

If queryPhase costs too much time, the ReaderContext may be released before fetchphase, so the fetch/Id will be failed, which hit the case.

The query phase has to be terminated early by timeout, right? So it should be not much longer then timeout itself?

Copy link
Contributor

❕ Gradle check result for d1fc8be: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autocut backport 2.x Backport to 2.x branch flaky-test Random test failure that succeeds on second run >test-failure Test failure from CI, local build, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[AUTOCUT] Gradle Check Flaky Test Report for SearchTimeoutIT
3 participants