-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Additional index settings provider validation #113838
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
Additional index settings provider validation #113838
Conversation
…nother index settings provider.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me. Thanks @martijnvg.
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
|
Pinging @elastic/es-data-management (Team:Data Management) |
| templateAndRequestSettings, | ||
| combinedTemplateMappings | ||
| ); | ||
| validateAdditionalSettings(provider, newAdditionalSettings, additionalIndexSettings); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we validate the newAdditionalSettings against the additionalSettings seen so far and not values previously set by the user for example templateAndRequestSettings. Are these 2 settings sets disjoint ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The newAdditionalSettings variable contains any settings that the current index settings provider might have set. The additionalIndexSettings variable tracks any settings that any index settings provider may have set while looping over the list of index settings providers. The new validation requires that newAdditionalSettings cannot contain any settings that are already defined in additionalIndexSettings. So yes, these two Settings variables should be a disjoint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Thanks Mary and Nhat for reviewing! |
Fail if an index settings provider adds a setting that was added by another index settings provider.
💚 Backport successful
|
Fail if an index settings provider adds a setting that was added by another index settings provider.
Fail if an index settings provider adds a setting that was added by another index settings provider.