-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Fix leaking searcher when shards are removed or relocated #52099
Conversation
Pinging @elastic/es-search (:Search/Search) |
@mark-vieira Thanks for the head-up. Since you muted this suite on 7.x only, I will unmute it when backporting this PR. |
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.
LGTM, maybe also update the comment in the finally block so that it doesn't look like the DefaultSearchContext constructor is the only call that may fail?
++. I've adjusted the comment in ad5fe76. Thank you for reviewing, Adrien. |
@dnhatn I think this needs to be backported to https://gradle-enterprise.elastic.co/s/zhx3wtz3etvxe/tests/kyv2y2z3r4v7m-ncgrhme3gg7g4 |
@mark-vieira This PR fixed a bug introduced in #51708, which got into only 8.0 and 7.7. Anyway, I will take a look at the failure that you linked. Thank you for the ping. |
We might leak a searcher if the target shard is removed (i.e., its index is deleted) or relocated while we are creating a SearchContext from a SearchRewriteContext.
Relates #51708
Closes #52021
I labelled this non-issue for an unreleased bug introduced in #51708.