Skip to content

Template disallow changing index_mode from time_series to something else #84116

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

Merged
merged 3 commits into from
Mar 7, 2022

Conversation

martijnvg
Copy link
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
@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label Feb 17, 2022
@elasticmachine
Copy link
Collaborator

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

@martijnvg martijnvg requested a review from dakrone February 17, 2022 15:46
Copy link
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

@@ -734,6 +736,53 @@ private static void validateDataStreamsStillReferenced(ClusterState state, Strin
}
}

// This method should be invoked after validateDataStreamsStillReferenced(...)
Copy link
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
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
:Data Management/Data streams Data streams and their lifecycles >non-issue Team:Data Management Meta label for data/management team v8.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants