338339340341342343344345346347348
if (!isRelocationDestinationShard) { routingNodes.unassigned().add(shardRoutingEntry); } shardRoutingEntry.deassignNode(); currentNodeIsDead = true; shardsIterator.remove(); } // move source shard back to active state and cancel relocation mode.
435436437438439440441442443444445
Iterator<MutableShardRouting> shards = routingNode.iterator(); while (shards.hasNext()) { MutableShardRouting shard = shards.next(); if (shard.shardId().equals(failedShard.shardId())) { shardDirty = true; shard.deassignNode(); shards.remove(); break; } } }
457458459460461462463464465466467
while (shards.hasNext()) { MutableShardRouting shard = shards.next(); if (shard.shardId().equals(failedShard.shardId())) { shardDirty = true; if (!inRelocation) { shard.deassignNode(); shards.remove(); } else { shard.cancelRelocation(); } break;