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

Fixes potential NullPointerException on shard closing #21515

Merged
merged 1 commit into from Nov 13, 2016

Conversation

abeyad
Copy link

@abeyad abeyad commented Nov 12, 2016

It was possible that in IndexService#closeShard(), an attempt
would be made to close the store where the store was not yet
initialized, throwing a NullPointerException. This commit
ensures that we do not call close on a store that has not
yet been initialized.

This was already fixed as part of #21084 which went into 6.0
and 5.x (see https://github.com/elastic/elasticsearch/pull/21084/files#diff-00f21a995130f7df8879749075287053R414), so this is a backport of this
particular NPE issue to 5.0.

would be made to close the store where the store was not yet
initialized, throwing a NullPointerException.  This commit
ensures that we do not call close on a store that has not
yet been initialized.
Copy link
Contributor

@ywelsch ywelsch left a comment

Choose a reason for hiding this comment

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

LGTM

@abeyad
Copy link
Author

abeyad commented Nov 13, 2016

thanks @ywelsch

@abeyad abeyad merged commit 30f6394 into elastic:5.0 Nov 13, 2016
@abeyad abeyad deleted the fix/shard_close_npe branch November 13, 2016 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants