From fcbe3f92b7a14040950d8c943199b6572ace85ef Mon Sep 17 00:00:00 2001 From: Lee Hinman Date: Fri, 10 Apr 2015 16:38:45 -0600 Subject: [PATCH] [CORE] Log sending translog operation batches to nodes --- .../indices/recovery/RecoverySourceHandler.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/org/elasticsearch/indices/recovery/RecoverySourceHandler.java b/src/main/java/org/elasticsearch/indices/recovery/RecoverySourceHandler.java index 4b52c9d87ab..c35080f95ed 100644 --- a/src/main/java/org/elasticsearch/indices/recovery/RecoverySourceHandler.java +++ b/src/main/java/org/elasticsearch/indices/recovery/RecoverySourceHandler.java @@ -610,6 +610,10 @@ public class RecoverySourceHandler implements Engine.RecoveryHandler { .withType(TransportRequestOptions.Type.RECOVERY) .withTimeout(recoverySettings.internalActionLongTimeout()); + if (operation == null) { + logger.trace("[{}][{}] no translog operations to send to {}", + indexName, shardId, request.targetNode()); + } while (operation != null) { if (shard.state() == IndexShardState.CLOSED) { throw new IndexShardClosedException(request.shardId()); @@ -642,6 +646,12 @@ public class RecoverySourceHandler implements Engine.RecoveryHandler { recoveryOptions, EmptyTransportResponseHandler.INSTANCE_SAME).txGet(); } }); + if (logger.isTraceEnabled()) { + logger.trace("[{}][{}] sent batch of [{}][{}] (total: [{}]) translog operations to {}", + indexName, shardId, ops, new ByteSizeValue(size), + shard.translog().estimatedNumberOfOperations(), + request.targetNode()); + } ops = 0; size = 0; @@ -665,6 +675,12 @@ public class RecoverySourceHandler implements Engine.RecoveryHandler { }); } + if (logger.isTraceEnabled()) { + logger.trace("[{}][{}] sent final batch of [{}][{}] (total: [{}]) translog operations to {}", + indexName, shardId, ops, new ByteSizeValue(size), + shard.translog().estimatedNumberOfOperations(), + request.targetNode()); + } return totalOperations; }