This commit is contained in:
kimchy 2010-08-25 22:03:11 +03:00
parent 9d615a4f0b
commit 3ebd03f69a
1 changed files with 2 additions and 0 deletions

View File

@ -41,6 +41,8 @@ public class RebalanceOnlyWhenActiveNodeAllocation extends NodeAllocation {
@Override public boolean canRebalance(ShardRouting shardRouting, RoutingNodes routingNodes, DiscoveryNodes nodes) {
List<MutableShardRouting> shards = routingNodes.shardsRoutingFor(shardRouting);
// its ok to check for active here, since in relocation, a shard is split into two in routing
// nodes, once relocating, and one initializing
for (ShardRouting allShard : shards) {
if (!allShard.active()) {
return false;