Skip to content

Commit

Permalink
Ensure no ongoing peer recovery in translog yaml test (elastic#46476)
Browse files Browse the repository at this point in the history
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 elastic#46425
  • Loading branch information
dnhatn authored and turackangal committed Sep 14, 2019
1 parent 92a758d commit 0855f49
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- do:
cluster.health:
wait_for_no_initializing_shards: true
wait_for_events: languid
- do:
indices.stats:
metric: [ translog ]
Expand Down

0 comments on commit 0855f49

Please sign in to comment.