more on sorted nodes when allocating shards above average number of shards per node
This commit is contained in:
parent
76e1a6b1bf
commit
2865ceef85
|
@ -270,7 +270,7 @@ public class ShardsRoutingStrategy extends AbstractComponent {
|
|||
}
|
||||
}
|
||||
// go over the nodes and try and allocate the remaining ones
|
||||
for (RoutingNode routingNode : routingNodes.nodesToShards().values()) {
|
||||
for (RoutingNode routingNode : routingNodes.sortedNodesLeastToHigh()) {
|
||||
if (routingNode.canAllocate(routingNodes) && routingNode.canAllocate(shard)) {
|
||||
changed = true;
|
||||
routingNode.add(shard);
|
||||
|
|
Loading…
Reference in New Issue