-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow the removal of an in use template if there are other matching o…
…nes (#96286) (#96342) A data stream can match multiple composable index templates which are prioritised and the highest priority template is the currently in-use template. A data stream should always have a matching template, for this reason when we are removing a composable template we check that it is not in use. If it is in use, we throw an error and the removal fails. However, since a data stream can match multiple templates, removing the currently in use template could mean that the data stream would start using the next inline. In this case, the removal should be allowed. This is what this PR addresses. When we try to remove a composable template, we do not check if this template is in use, but if this template is the only template that a data stream could use. Only then we fail the removal, otherwise the removal succeeds and the data stream starts using the next in-line template. Fixes: #96022 Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
- Loading branch information
1 parent
fc64378
commit 97caf71
Showing
3 changed files
with
130 additions
and
38 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pr: 96286 | ||
summary: Allow the removal of an in-use template if there are other ones matching | ||
the dependent data streams | ||
area: Data streams | ||
type: bug | ||
issues: [] |
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
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