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

Throws IndexNotFoundException in TransportGetAction for unknown System indices #61785

Merged
merged 1 commit into from
Sep 1, 2020

Conversation

tlrx
Copy link
Member

@tlrx tlrx commented Sep 1, 2020

The change #57936 introduced a dedicated thread pool for reads in system indices. It also introduced a potential NPE in the case the index to read in not yet present in the cluster state. Such a NPE surfaced recently in CI .

This pull request fixes that bug by using the getIndexSafe() instead of just index() method when retrieving the index's metadata so that an INFE is thrown if the index does not exist.

@tlrx tlrx added >bug :Core/Infra/Core Core issues without another label v8.0.0 v7.10.0 labels Sep 1, 2020
@tlrx tlrx requested a review from jaymode September 1, 2020 13:02
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Core)

@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Sep 1, 2020
Copy link
Member

@jaymode jaymode left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @tlrx

@tlrx tlrx merged commit f3c8792 into elastic:master Sep 1, 2020
@tlrx
Copy link
Member Author

tlrx commented Sep 1, 2020

Thanks Jay

@tlrx tlrx deleted the safe-indexmetadata-in-get-action branch September 1, 2020 14:45
tlrx added a commit that referenced this pull request Sep 1, 2020
…m indices (#61785) (#61791)

The change #57936 introduced a dedicated thread pool for reads in system indices. 
It also introduced a potential NPE in the case the index to read in not yet present in 
the cluster state. This commit fixes that bug by using the getIndexSafe() instead of 
just index() method when retrieving the index's metadata so that an INFE is thrown 
if the index does not exist.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Core/Infra/Core Core issues without another label Team:Core/Infra Meta label for core/infra team v7.10.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants