Allow GET <pattern>/_rollup/data to expand data streams (#58173) (#58177)

This commit is contained in:
Benjamin Trent 2020-06-16 14:01:54 -04:00 committed by GitHub
parent 3309817d18
commit 081da09c72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 1 deletions

View File

@ -46,7 +46,7 @@ public class TransportGetRollupIndexCapsAction extends HandledTransportAction<Ge
ActionListener<GetRollupIndexCapsAction.Response> listener) {
String[] indices = resolver.concreteIndexNames(clusterService.state(),
request.indicesOptions(), request.indices());
request.indicesOptions(), true, request.indices());
Map<String, RollableIndexCaps> allCaps = getCapsByRollupIndex(Arrays.asList(indices),
clusterService.state().getMetadata().indices());
listener.onResponse(new GetRollupIndexCapsAction.Response(allCaps));

View File

@ -114,3 +114,38 @@
indices.delete_data_stream:
name: logs-foobar
- is_true: acknowledged
---
"Verify data stream resolvability rollup":
- skip:
version: " - 7.8.99"
reason: "data streams only supported in 7.9+"
features: allowed_warnings
- do:
allowed_warnings:
- "index template [my-template] has index patterns [logs-*] matching patterns from existing older templates [global] with patterns (global => [*]); this template [my-template] will take precedence during new index creation"
indices.put_index_template:
name: my-ds-rolluptemplate
body:
index_patterns: [logs-*]
template:
mappings:
properties:
'@timestamp':
type: date
data_stream:
timestamp_field: '@timestamp'
- do:
indices.create_data_stream:
name: logs-ds-rollup
- is_true: acknowledged
- do:
# Should not raise error
rollup.get_rollup_index_caps:
index: "logs*"
- do:
indices.delete_data_stream:
name: logs-ds-rollup
- is_true: acknowledged