From dc07ece790e3f02ba30b7c046e2449398cd3139a Mon Sep 17 00:00:00 2001 From: Boaz Leskes Date: Thu, 15 May 2014 15:37:30 +0200 Subject: [PATCH] Added some debug logs to the recovery process --- .../org/elasticsearch/indices/recovery/RecoverySource.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/org/elasticsearch/indices/recovery/RecoverySource.java b/src/main/java/org/elasticsearch/indices/recovery/RecoverySource.java index b0216111560..79c5db79a73 100644 --- a/src/main/java/org/elasticsearch/indices/recovery/RecoverySource.java +++ b/src/main/java/org/elasticsearch/indices/recovery/RecoverySource.java @@ -97,6 +97,7 @@ public class RecoverySource extends AbstractComponent { // the index operations will not be routed to it properly RoutingNode node = clusterService.state().readOnlyRoutingNodes().node(request.targetNode().id()); if (node == null) { + logger.debug("delaying recovery of {} as source node {} is unknown", request.shardId(), request.targetNode()); throw new DelayRecoveryException("source node does not have the node [" + request.targetNode() + "] in its state yet.."); } ShardRouting targetShardRouting = null; @@ -107,9 +108,12 @@ public class RecoverySource extends AbstractComponent { } } if (targetShardRouting == null) { + logger.debug("delaying recovery of {} as it is not listed as assigned to target node {}", request.shardId(), request.targetNode()); throw new DelayRecoveryException("source node does not have the shard listed in its state as allocated on the node"); } if (!targetShardRouting.initializing()) { + logger.debug("delaying recovery of {} as it is not listed as initializing on the target node {}. known shards state is [{}]", + request.shardId(), request.targetNode(), targetShardRouting.state()); throw new DelayRecoveryException("source node has the state of the target shard to be [" + targetShardRouting.state() + "], expecting to be [initializing]"); }