check also for negative values

This commit is contained in:
kimchy 2010-08-21 19:51:14 +03:00
parent 5d2c005622
commit 76e1a6b1bf
1 changed files with 1 additions and 1 deletions

View File

@ -247,7 +247,7 @@ public class ShardsRoutingStrategy extends AbstractComponent {
if (node.canAllocate(routingNodes) && node.canAllocate(shard)) {
int numberOfShardsToAllocate = routingNodes.requiredAverageNumberOfShardsPerNode() - node.shards().size();
if (numberOfShardsToAllocate == 0) {
if (numberOfShardsToAllocate <= 0) {
continue;
}