Skip to content

Template disallow changing index_mode from time_series to something else#84116

Merged
martijnvg merged 3 commits intoelastic:masterfrom
martijnvg:template_index_mode_validation
Mar 7, 2022
Merged

Template disallow changing index_mode from time_series to something else#84116
martijnvg merged 3 commits intoelastic:masterfrom
martijnvg:template_index_mode_validation

Conversation

@martijnvg
Copy link
Copy Markdown
Member

Disallow changing template's index_mode field from time_series to something else,
if a tsdb data stream still matches with that template.

Followup from #83843

… else if a tsdb data stream still matches with that template
@martijnvg martijnvg added >non-issue :StorageEngine/Data streams Data streams and their lifecycles v8.2.0 labels Feb 17, 2022
@elasticmachine elasticmachine added the Team:Data Management (obsolete) DO NOT USE. This team no longer exists. label Feb 17, 2022
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@martijnvg martijnvg requested a review from dakrone February 17, 2022 15:46
Copy link
Copy Markdown
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks Martijn

}
}

// This method should be invoked after validateDataStreamsStillReferenced(...)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the reason why it should be invoked after because we want to check the more generic case first before the more specific TSDB case?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, currently this is mainly because it assumes that templates that do match with existing data streams have a DataStreamTemplate, which is something that validateDataStreamsStillReferenced(...) is checking for.

@martijnvg martijnvg merged commit 38df1dc into elastic:master Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>non-issue :StorageEngine/Data streams Data streams and their lifecycles Team:Data Management (obsolete) DO NOT USE. This team no longer exists. v8.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants