Ensure no ongoing peer recovery in translog yaml test (#46476)

We leave replicas unassigned until we reroute after the primary shard
starts. If a cluster health request with wait_for_no_initializing_shards
is executed before the reroute, it will return immediately although
there will be some initializing replicas. Peer recoveries of those
shards can prevent translog on the primary from trimming.

We add wait_for_events to the cluster health request so that it will
execute after the reroute.

Closes #46425
This commit is contained in:
Nhat Nguyen 2019-09-09 09:38:49 -04:00
parent 972d3569c1
commit 7f9e2f4d91
1 changed files with 1 additions and 0 deletions

View File

@ -9,6 +9,7 @@
- do:
cluster.health:
wait_for_no_initializing_shards: true
wait_for_events: languid
- do:
indices.stats:
metric: [ translog ]