-
Notifications
You must be signed in to change notification settings - Fork 25.3k
Save a little space in agg tree #53730
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
Changes from all commits
8552939
4c9db02
5b36280
bd890bc
aa33bbe
b9f4cda
1562e76
cff7a67
f335863
feb194c
12dae79
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,15 +15,15 @@ | |
refresh: true | ||
body: | ||
- '{"index": {"_index": "test_index"}}' | ||
- '{"f1": "local_cluster", "filter_field": 0}' | ||
- '{"f1": "local_cluster", "animal": "dog", "filter_field": 0}' | ||
- '{"index": {"_index": "test_index"}}' | ||
- '{"f1": "local_cluster", "filter_field": 1}' | ||
- '{"f1": "local_cluster", "animal": "dog", "filter_field": 1}' | ||
- '{"index": {"_index": "test_index"}}' | ||
- '{"f1": "local_cluster", "filter_field": 0}' | ||
- '{"f1": "local_cluster", "animal": "dog", "filter_field": 0}' | ||
- '{"index": {"_index": "test_index"}}' | ||
- '{"f1": "local_cluster", "filter_field": 1}' | ||
- '{"f1": "local_cluster", "animal": "dog", "filter_field": 1}' | ||
- '{"index": {"_index": "test_index"}}' | ||
- '{"f1": "local_cluster", "filter_field": 0}' | ||
- '{"f1": "local_cluster", "animal": "pig", "filter_field": 0}' | ||
|
||
- do: | ||
search: | ||
|
@@ -115,6 +115,87 @@ | |
- match: { aggregations.cluster.buckets.0.key: "local_cluster" } | ||
- match: { aggregations.cluster.buckets.0.doc_count: 5 } | ||
|
||
# once more, this time with a top level pipeline agg | ||
- do: | ||
search: | ||
rest_total_hits_as_int: true | ||
index: test_index,my_remote_cluster:test_index | ||
body: | ||
seq_no_primary_term: true | ||
aggs: | ||
cluster: | ||
terms: | ||
field: f1.keyword | ||
aggs: | ||
s: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we add a non-top-level pipeline agg just to confirm they aren't affected? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I figured I'd get it in my next PR about non-top-level pipeline aggs, but I'm happy to do it now! |
||
sum: | ||
field: filter_field | ||
average_sum: | ||
avg_bucket: | ||
buckets_path: cluster.s | ||
|
||
- match: { num_reduce_phases: 3 } | ||
- match: {_clusters.total: 2} | ||
- match: {_clusters.successful: 2} | ||
- match: {_clusters.skipped: 0} | ||
- match: { _shards.total: 5 } | ||
- match: { hits.total: 11 } | ||
- length: { aggregations.cluster.buckets: 2 } | ||
- match: { aggregations.cluster.buckets.0.key: "remote_cluster" } | ||
- match: { aggregations.cluster.buckets.0.doc_count: 6 } | ||
- match: { aggregations.cluster.buckets.0.s.value: 2 } | ||
- match: { aggregations.cluster.buckets.1.key: "local_cluster" } | ||
- match: { aggregations.cluster.buckets.1.s.value: 2 } | ||
- match: { aggregations.average_sum.value: 2 } | ||
|
||
# and now a non-top-level pipeline agg! | ||
- do: | ||
search: | ||
rest_total_hits_as_int: true | ||
index: test_index,my_remote_cluster:test_index | ||
body: | ||
seq_no_primary_term: true | ||
aggs: | ||
cluster: | ||
terms: | ||
field: f1.keyword | ||
aggs: | ||
animal: | ||
terms: | ||
field: animal.keyword | ||
aggs: | ||
s: | ||
sum: | ||
field: filter_field | ||
average_sum: | ||
avg_bucket: | ||
buckets_path: animal.s | ||
|
||
- match: { num_reduce_phases: 3 } | ||
- match: {_clusters.total: 2} | ||
- match: {_clusters.successful: 2} | ||
- match: {_clusters.skipped: 0} | ||
- match: { _shards.total: 5 } | ||
- match: { hits.total: 11 } | ||
- length: { aggregations.cluster.buckets: 2 } | ||
- match: { aggregations.cluster.buckets.0.key: "remote_cluster" } | ||
- match: { aggregations.cluster.buckets.0.doc_count: 6 } | ||
- match: { aggregations.cluster.buckets.0.animal.buckets.0.key: "chicken" } | ||
- match: { aggregations.cluster.buckets.0.animal.buckets.0.doc_count: 4 } | ||
- match: { aggregations.cluster.buckets.0.animal.buckets.0.s.value: 1 } | ||
- match: { aggregations.cluster.buckets.0.animal.buckets.1.key: "pig" } | ||
- match: { aggregations.cluster.buckets.0.animal.buckets.1.doc_count: 2 } | ||
- match: { aggregations.cluster.buckets.0.animal.buckets.1.s.value: 1 } | ||
- match: { aggregations.cluster.buckets.0.average_sum.value: 1 } | ||
- match: { aggregations.cluster.buckets.1.key: "local_cluster" } | ||
- match: { aggregations.cluster.buckets.1.animal.buckets.0.key: "dog" } | ||
- match: { aggregations.cluster.buckets.1.animal.buckets.0.doc_count: 4 } | ||
- match: { aggregations.cluster.buckets.1.animal.buckets.0.s.value: 2 } | ||
- match: { aggregations.cluster.buckets.1.animal.buckets.1.key: "pig" } | ||
- match: { aggregations.cluster.buckets.1.animal.buckets.1.doc_count: 1 } | ||
- match: { aggregations.cluster.buckets.1.animal.buckets.1.s.value: 0 } | ||
- match: { aggregations.cluster.buckets.1.average_sum.value: 1 } | ||
|
||
--- | ||
"Add transient remote cluster based on the preset cluster": | ||
- do: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have a similar test for the
rolling-upgrade
module? Theoretically it should be the same as CCS, but it might also smoke out different issues due to heterogeneous serialization inside the same cluster (instead of funneling through a gateway).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be great to have a "mixed cluster CCS" test. I talked that one through with @javanna and we don't have one now and probably don't want to build one just for this.