-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Add a template parameter to override auto_create_index value #64208
Merged
pugnascotia
merged 16 commits into
elastic:7.x
from
pugnascotia:20640-auto-create-templates-7x
Nov 5, 2020
Merged
Add a template parameter to override auto_create_index value #64208
pugnascotia
merged 16 commits into
elastic:7.x
from
pugnascotia:20640-auto-create-templates-7x
Nov 5, 2020
Conversation
This file contains 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
…#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`.
pugnascotia
added
>enhancement
:Data Management/Indices APIs
APIs to create and manage indices and templates
backport
v7.11.0
labels
Oct 27, 2020
Pinging @elastic/es-core-features (:Core/Features/Indices APIs) |
elasticmachine
added
the
Team:Data Management
Meta label for data/management team
label
Oct 27, 2020
@elasticmachine run elasticsearch-ci/bwc |
@elasticmachine update branch |
@elasticmachine update branch |
martijnvg
approved these changes
Nov 5, 2020
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 👍
imotov
added a commit
that referenced
this pull request
Nov 5, 2020
Fixes the serialization version after backport of #64208
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport
:Data Management/Indices APIs
APIs to create and manage indices and templates
>enhancement
Team:Data Management
Meta label for data/management team
v7.11.0
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:
AutoCreateIndex
now looks for a matching v2 template, and if itsallow_auto_create
setting is true, it overrides the usual logic.TransportBulkAction
previously usedAutoCreateIndex
to checkwhether missing indices should be created. We now rely on
AutoCreateAction
, which was already differentiating between creatingindices and creating data streams. I've updated
AutoCreateAction
touse
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_index
isfalse
.