Inconsistent awareness allocation #12522
Labels
discuss
:Distributed/Allocation
All issues relating to the decision making around placing a shard (both master logic & on the nodes)
When awareness attribute is unbalanced, behavior of shard allocation is inconsistent depending on how many shards are already started.
Reproduction: https://gist.github.com/masaruh/63db5a030220a26cc2a8
It allocates all shards of an index to nodes on creation but when one of nodes leaves and comes back, it doesn't allocate previously allocated shard back to the node anymore.
(All shards shouldn't be allocated in the first place?)
Probably because AwarenessAllocationDecider doesn't take initializing shards into consideration when it checks if shards can be allocated on nodes (https://github.com/elastic/elasticsearch/blob/v1.7.0/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/AwarenessAllocationDecider.java#L189-L198)?
Looks to be related to #12431.
The text was updated successfully, but these errors were encountered: