Add a template parameter to override auto_create_index value#64208
Merged
pugnascotia merged 16 commits intoelastic:7.xfrom Nov 5, 2020
Merged
Add a template parameter to override auto_create_index value#64208pugnascotia merged 16 commits intoelastic:7.xfrom
pugnascotia merged 16 commits intoelastic:7.xfrom
Conversation
…#61858) Closes elastic#20640. This PR introduces a new parameter to v2 templates, `allow_auto_create`, which allows templates to override the cluster setting `auto_create_index`. Notes: * `AutoCreateIndex` now looks for a matching v2 template, and if its `allow_auto_create` setting is true, it overrides the usual logic. * `TransportBulkAction` previously used `AutoCreateIndex` to check whether missing indices should be created. We now rely on `AutoCreateAction`, which was already differentiating between creating indices and creating data streams. I've updated `AutoCreateAction` to use `AutoCreateIndex`. Data streams are also influenced by `allow_auto_create`, in that their default auto-create behaviour can be disabled with this setting. * Most of the Java file changes are due to introducing an extra constructor parameter to `ComposableIndexTemplate`. * I've added the new setting to various x-pack templates * I added a YAML test to check that watches can be created even when `auto_create_index` is `false`.
Collaborator
|
Pinging @elastic/es-core-features (:Core/Features/Indices APIs) |
Contributor
Author
|
@elasticmachine run elasticsearch-ci/bwc |
Contributor
Author
|
@elasticmachine update branch |
Contributor
Author
|
@elasticmachine update branch |
imotov
added a commit
that referenced
this pull request
Nov 5, 2020
Fixes the serialization version after backport of #64208
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #61858.
Closes #20640.
This PR introduces a new parameter to v2 templates,
allow_auto_create,which allows templates to override the cluster setting
auto_create_index.Notes:
AutoCreateIndexnow looks for a matching v2 template, and if itsallow_auto_createsetting is true, it overrides the usual logic.TransportBulkActionpreviously usedAutoCreateIndexto checkwhether missing indices should be created. We now rely on
AutoCreateAction, which was already differentiating between creatingindices and creating data streams. I've updated
AutoCreateActiontouse
AutoCreateIndex. Data streams are also influenced byallow_auto_create, in that their default auto-create behaviour canbe disabled with this setting.
constructor parameter to
ComposableIndexTemplate.auto_create_indexisfalse.