Skip zone/host awareness with auto-expand replicas (#69334)

Today if an index is set to `auto_expand_replicas: N-all` then we will
try and create a shard copy on every node that matches the applicable
allocation filters. This conflits with shard allocation awareness and
the same-host allocation decider if there is an uneven distribution of
nodes across zones or hosts, since these deciders prevent shard copies
from being allocated unevenly and may therefore leave some unassigned
shards.

The point of these two deciders is to improve resilience given a limited
number of shard copies but there is no need for this behaviour when the
number of shard copies is not limited, so this commit supresses them in
that case.

Closes #54151
Closes #2869
This commit is contained in:
David Turner 2021-02-22 16:53:58 +00:00 committed by GitHub
parent f27da75a6e
commit bb3ea99850
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 142 additions and 20 deletions

View file

@ -45,7 +45,7 @@ one of the active allocation ids in the cluster state.
These should be fast so more initial primary recoveries can happen in
parallel on the same node. Defaults to `4`.
[[cluster-routing-allocation-same-shard-host]]
`cluster.routing.allocation.same_shard.host`::
(<<dynamic-cluster-setting,Dynamic>>)
Allows to perform a check to prevent allocation of multiple instances of