diff --git a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/AbstractAsyncBulkByScrollAction.java b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/AbstractAsyncBulkByScrollAction.java index 94eead724cc7d..599bcb738b2be 100644 --- a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/AbstractAsyncBulkByScrollAction.java +++ b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/AbstractAsyncBulkByScrollAction.java @@ -354,8 +354,9 @@ void prepareBulkRequest(long thisBatchStartTimeNS, ScrollConsumableHitsResponse * Send a bulk request, handling retries. */ void sendBulkRequest(BulkRequest request, Runnable onSuccess) { + final int requestSize = request.requests().size(); if (logger.isDebugEnabled()) { - logger.debug("[{}]: sending [{}] entry, [{}] bulk request", task.getId(), request.requests().size(), + logger.debug("[{}]: sending [{}] entry, [{}] bulk request", task.getId(), requestSize, new ByteSizeValue(request.estimatedSizeInBytes())); } if (task.isCancelled()) { @@ -366,6 +367,7 @@ void sendBulkRequest(BulkRequest request, Runnable onSuccess) { bulkRetry.withBackoff(bulkClient::bulk, request, new ActionListener() { @Override public void onResponse(BulkResponse response) { + logger.debug("[{}]: completed [{}] entry bulk request", task.getId(), requestSize); onBulkResponse(response, onSuccess); } diff --git a/server/src/main/java/org/elasticsearch/index/reindex/ScrollableHitSource.java b/server/src/main/java/org/elasticsearch/index/reindex/ScrollableHitSource.java index 17a7857f85f26..eaed370f86761 100644 --- a/server/src/main/java/org/elasticsearch/index/reindex/ScrollableHitSource.java +++ b/server/src/main/java/org/elasticsearch/index/reindex/ScrollableHitSource.java @@ -85,7 +85,7 @@ private void startNextScroll(TimeValue extraKeepAlive, RejectAwareActionListener } private void onResponse(Response response) { - logger.debug("scroll returned [{}] documents with a scroll id of [{}]", response.getHits().size(), response.getScrollId()); + logger.trace("scroll returned [{}] documents with a scroll id of [{}]", response.getHits().size(), response.getScrollId()); setScroll(response.getScrollId()); onResponse.accept(new AsyncResponse() { private AtomicBoolean alreadyDone = new AtomicBoolean();