Skip to content

Downsampling: add more tests for downsample action #90024

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 2 commits into from
Sep 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,15 @@ setup:
indices.get:
index: test

# Assert rollup index has been force merged
- do:
indices.segments:
index: rollup-test

- match: { _shards.total: 1}
- match: { indices.rollup-test.shards.0.0.num_committed_segments: 1}
- match: { indices.rollup-test.shards.0.0.num_search_segments: 1}

---
"Rollup non-existing index":
- skip:
Expand Down Expand Up @@ -181,3 +190,67 @@ setup:
{
"fixed_interval": "1h"
}

---
"Rollup not time_series index":
- skip:
version: " - 8.4.99"
reason: "rollup renamed to downsample in 8.5.0"

- do:
indices.create:
index: normal-index

- do:
catch: /Rollup requires setting \[index.mode=time_series\] for index \[normal-index\]/
indices.downsample:
index: normal-index
target_index: rollup-test
body: >
{
"fixed_interval": "1h"
}


---
"Rollup no metric index":
- skip:
version: " - 8.4.99"
reason: "rollup renamed to downsample in 8.5.0"

- do:
indices.create:
index: no-metric-index
body:
settings:
number_of_shards: 1
number_of_replicas: 0
index:
mode: time_series
routing_path: [metricset]
time_series:
start_time: 2021-04-28T00:00:00Z
end_time: 2021-04-29T00:00:00Z
mappings:
properties:
"@timestamp":
type: date
metricset:
type: keyword
time_series_dimension: true

- do:
indices.put_settings:
index: no-metric-index
body:
index.blocks.write: true

- do:
catch: /Index \[no-metric-index\] does not contain any metric fields;/
indices.downsample:
index: no-metric-index
target_index: rollup-test
body: >
{
"fixed_interval": "1h"
}