Fix the timestamp field of a data stream to @timestamp#59210
Merged
martijnvg merged 9 commits intoelastic:7.xfrom Jul 8, 2020
Merged
Fix the timestamp field of a data stream to @timestamp#59210martijnvg merged 9 commits intoelastic:7.xfrom
martijnvg merged 9 commits intoelastic:7.xfrom
Conversation
Backport elastic#59076 of to 7.x branch. The commit makes the following changes: * The timestamp field of a data stream definition in a composable index template can only be set to '@timestamp'. * Removed custom data stream timestamp field validation and reuse the validation from `TimestampFieldMapper` and instead only check that the _timestamp field mapping has been defined on a backing index of a data stream. * Moved code that injects _timestamp meta field mapping from `MetadataCreateIndexService#applyCreateIndexRequestWithV2Template58956(...)` method to `MetadataIndexTemplateService#collectMappings(...)` method. * Fixed a bug (elastic#58956) that cases timestamp field validation to be performed for each template and instead of the final mappings that is created. * only apply _timestamp meta field if index is created as part of a data stream or data stream rollover, this fixes a docs test, where a regular index creation matches (logs-*) with a template with a data stream definition. Relates to elastic#58642 Relates to elastic#53100 Closes elastic#58956 Closes elastic#58583
(a change got in after I merged in master into this pr, but didn't notice it until I merged this pr)
Collaborator
|
Pinging @elastic/es-core-features (:Core/Features/Data streams) |
Member
Author
|
@elasticmachine run elasticsearch-ci/2 |
Member
Author
|
ci/2 failed, because of |
Member
Author
|
@elasticmachine run elasticsearch-ci/2 |
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 #59076 of to 7.x branch.
The commit makes the following changes:
index template can only be set to '@timestamp'.
TimestampFieldMapperandinstead only check that the _timestamp field mapping has been defined on a backing index of a data stream.
MetadataCreateIndexService#applyCreateIndexRequestWithV2Template58956(...)methodto
MetadataIndexTemplateService#collectMappings(...)method.for each template and instead of the final mappings that is created.
this fixes a docs test, where a regular index creation matches (logs-*) with a template with a data stream definition.
Relates to #58642
Relates to #53100
Closes #58956
Closes #58583