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 NPE when updating settings on managed system indices #67200

Merged
merged 1 commit into from
Jan 11, 2021

Conversation

gwbrown
Copy link
Contributor

@gwbrown gwbrown commented Jan 8, 2021

expectedValue can be null (and in fact will always be null if a key is in requestedSettings but not descriptorSettings), so using Objects.equals prevents an NPE here.

Relates #67147

`expectedValue` can be `null`, so using `Objects.equals` prevents an NPE here.
@gwbrown gwbrown requested a review from pugnascotia January 8, 2021 00:38
@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Jan 8, 2021
@elasticmachine
Copy link
Collaborator

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

@gwbrown
Copy link
Contributor Author

gwbrown commented Jan 8, 2021

I verified that this fixes the issue by reverting #67162 on a branch and applying this fix on top, then reproducing as described in #67147 (as the issue no longer reproduces with those commands when the .tasks changes have been reverted, because .tasks needs to be automatically managed to reproduce the problem).

Copy link
Contributor

@pugnascotia pugnascotia 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 for fixing

@gwbrown gwbrown merged commit 031e725 into elastic:master Jan 11, 2021
@gwbrown gwbrown deleted the fix-si-settings-npe branch January 11, 2021 17:44
gwbrown added a commit to gwbrown/elasticsearch that referenced this pull request Jan 11, 2021
`expectedValue` can be `null` (and in fact will always be `null` if a key is in `requestedSettings` but not `descriptorSettings`), so using `Objects.equals` prevents an NPE here.
gwbrown added a commit to gwbrown/elasticsearch that referenced this pull request Jan 11, 2021
`expectedValue` can be `null` (and in fact will always be `null` if a key is in `requestedSettings` but not `descriptorSettings`), so using `Objects.equals` prevents an NPE here.
gwbrown added a commit that referenced this pull request Jan 11, 2021
`expectedValue` can be `null` (and in fact will always be `null` if a key is in `requestedSettings` but not `descriptorSettings`), so using `Objects.equals` prevents an NPE here.
gwbrown added a commit that referenced this pull request Jan 11, 2021
`expectedValue` can be `null` (and in fact will always be `null` if a key is in `requestedSettings` but not `descriptorSettings`), so using `Objects.equals` prevents an NPE here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Core Core issues without another label >non-issue Team:Core/Infra Meta label for core/infra team v7.11.0 v7.12.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants