Skip to content

Commit

Permalink
Lock test to single shard index (backport of #74627) (#74634)
Browse files Browse the repository at this point in the history
The filter by filter terms aggregation optimization only kicks in when
its targeting a non-empty shard. An empty shard is fast to collect no
matter what so there isn't really any need to do anything complex.
Anyway, this locks the test to a single sharded index so there isn't a
chance of the debugging data coming back from an empty shard. Which
would cause the test to fail because its expecting the optimization to
run.

Closes #74612
  • Loading branch information
nik9000 committed Jun 28, 2021
1 parent be63d33 commit 5d334f2
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
setup:
# Lock to one shard so the tests don't sometimes try to collect from an empty
# index. If they do they'll use the GlobalOrdinals collector regardless of the
# optimization setting. That's fine - but it causes the test to fail so we
# need to dodge that case.
- do:
indices.create:
index: test
body:
settings:
index:
number_of_shards: 1
number_of_replicas: 0

- do:
cluster.put_settings:
body:
Expand Down

0 comments on commit 5d334f2

Please sign in to comment.