Fix leaking searcher when shards are removed or relocated#52099
Fix leaking searcher when shards are removed or relocated#52099dnhatn merged 4 commits intoelastic:masterfrom
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. |
jpountz
left a comment
There was a problem hiding this comment.
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.