mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
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…
x
Reference in New Issue
Block a user