Skip to content

[7.x] Support dependent validation for index settings (#70144) #70275

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

Conversation

henningandersen
Copy link
Contributor

Backport of #70144

A setting validator can declare settings that the validation depends on,
but when updating index settings, we eagerly validate the settings
before submitting the cluster state update and here we do not know the
existing settings. With this commit, we ensure that the pre-validation
only validates the keys and not the values, leaving the value validation
to after we have combined existing settings with the new settings on a
per index basis.

A setting validator can declare settings that the validation depends on,
but when updating index settings, we eagerly validate the settings
before submitting the cluster state update and here we do not know the
existing settings. With this commit, we ensure that the pre-validation
only validates the keys and not the values, leaving the value validation
to after we have combined existing settings with the new settings on a
per index basis.
@henningandersen henningandersen added :Core/Infra/Settings Settings infrastructure and APIs backport v7.13.0 labels Mar 10, 2021
@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Mar 10, 2021
@elasticmachine
Copy link
Collaborator

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

@henningandersen henningandersen merged commit 52b8251 into elastic:7.x Mar 11, 2021
henningandersen added a commit that referenced this pull request Mar 11, 2021
A setting validator can declare settings that the validation depends on,
but when updating index settings, we eagerly validate the settings
before submitting the cluster state update and here we do not know the
existing settings. With this commit, we ensure that the pre-validation
only validates the keys and not the values, leaving the value validation
to after we have combined existing settings with the new settings on a
per index basis.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport :Core/Infra/Settings Settings infrastructure and APIs Team:Core/Infra Meta label for core/infra team v7.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants