add a comment on why we don't mark as relocated when relcoating primaries

This commit is contained in:
kimchy 2010-11-06 22:03:11 +02:00
parent 9bddd6770c
commit b568174bee
1 changed files with 2 additions and 1 deletions

View File

@ -385,7 +385,8 @@ public class IndicesClusterStateService extends AbstractLifecycleComponent<Indic
// relocating primaries, recovery from the relocating shard
final DiscoveryNode sourceNode = nodes.get(shardRouting.relocatingNodeId());
try {
// we are recovering a backup from a primary, so no need to mark it as relocated
// we don't mark this one as relocated at the end, requests in any case are routed to both when its relocating
// and that way we handle the edge case where its mark as relocated, and we might need to roll it back...
final StartRecoveryRequest request = new StartRecoveryRequest(indexShard.shardId(), sourceNode, nodes.localNode(), false, indexShard.store().list());
recoveryTarget.startRecovery(request, false, new PeerRecoveryListener(request, shardRouting, indexService));
} catch (Exception e) {