forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply lazy rollover on index template creation
We should trigger a lazy rollover of existing data streams regardless of whether the index template is being created or updated. This ensures that the apm-data plugin will roll over data streams that were previously using the Fleet integration package.
- Loading branch information
Showing
6 changed files
with
124 additions
and
49 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
x-pack/plugin/apm-data/src/yamlRestTest/resources/rest-api-spec/test/10_rollover.yml
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,54 @@ | ||
--- | ||
setup: | ||
- do: | ||
cluster.health: | ||
wait_for_events: languid | ||
- do: | ||
indices.put_index_template: | ||
name: traces-low-prio | ||
body: | ||
data_stream: {} | ||
index_patterns: ["traces-*"] | ||
priority: 1 | ||
|
||
--- | ||
"Test data stream rollover on template installation": | ||
- skip: | ||
awaits_fix: "https://github.com/elastic/elasticsearch/issues/102360" | ||
|
||
# Disable the apm-data plugin and delete the traces-apm@template index | ||
# template so traces-low-prio takes effect. | ||
- do: | ||
cluster.put_settings: | ||
body: | ||
transient: | ||
xpack.apm_data.registry.enabled: false | ||
- do: | ||
indices.delete_index_template: | ||
name: traces-apm@template | ||
- do: | ||
indices.create_data_stream: | ||
name: traces-apm-testing | ||
- do: | ||
indices.get_data_stream: | ||
name: traces-apm-testing | ||
- match: {data_streams.0.template: traces-low-prio} | ||
|
||
# Re-enable the apm-data plugin, after which the traces-apm@template | ||
# index template should be recreated and trigger a lazy rollover on | ||
# the traces-apm-testing data stream. | ||
- do: | ||
cluster.put_settings: | ||
body: | ||
transient: | ||
xpack.apm_data.registry.enabled: true | ||
- do: | ||
cluster.health: | ||
wait_for_events: languid | ||
- do: | ||
indices.get_data_stream: | ||
name: traces-apm-testing | ||
- length: {data_streams: 1} | ||
- match: {data_streams.0.template: traces-apm@template} | ||
- match: {data_streams.0.rollover_on_write: true} | ||
|
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
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
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