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

Fix possible NPE on search phase failure #57952

Merged
merged 2 commits into from
Jun 11, 2020

Conversation

jimczi
Copy link
Contributor

@jimczi jimczi commented Jun 10, 2020

When a search phase fails, we release the context of all successful shards.
Successful shards that rewrite the request to match none will not create any context
since #51708. This change ensures that we don't try to release a null context on these
successful shards.

Closes #57945

When a search phase fails, we release the context of all successful shards.
Successful shards that rewrite the request to match none will not create any context
since #. This change ensures that we don't try to release a `null` context on these
successful shards.

Closes elastic#57945
@jimczi jimczi added >bug :Search/Search Search-related issues that do not fall into other categories v8.0.0 v7.8.1 v7.9.0 v7.7.2 labels Jun 10, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Search)

@elasticmachine elasticmachine added the Team:Search Meta label for search team label Jun 10, 2020
Copy link
Contributor

@mayya-sharipova mayya-sharipova left a comment

Choose a reason for hiding this comment

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

Thanks @jimczi , makes sense

@jimczi jimczi merged commit 637f081 into elastic:master Jun 11, 2020
@jimczi jimczi removed the v7.7.2 label Jun 11, 2020
jimczi added a commit that referenced this pull request Jun 11, 2020
When a search phase fails, we release the context of all successful shards.
Successful shards that rewrite the request to match none will not create any context
since #. This change ensures that we don't try to release a `null` context on these
successful shards.

Closes #57945
jimczi added a commit that referenced this pull request Jun 11, 2020
When a search phase fails, we release the context of all successful shards.
Successful shards that rewrite the request to match none will not create any context
since #. This change ensures that we don't try to release a `null` context on these
successful shards.

Closes #57945
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team v7.8.1 v7.9.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FieldSortIT.testCastDate fails due to in-flight contexts
4 participants