Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log reindex bulk request completion #75935

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Log reindex bulk request completion
Today we log at `DEBUG` when we receive a scroll response and send the
bulk request but do not log the completion of the bulk request or the
start of the next scroll request. This makes it impossible to tell from
the logs how long these things are taking.

This commit adds the missing logging.
DaveCTurner committed Aug 2, 2021
commit 297cf3fda680fbbf7c946be031822fa1e006cf0d
Original file line number Diff line number Diff line change
@@ -353,8 +353,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()) {
@@ -365,6 +366,7 @@ void sendBulkRequest(BulkRequest request, Runnable onSuccess) {
bulkRetry.withBackoff(bulkClient::bulk, request, new ActionListener<BulkResponse>() {
@Override
public void onResponse(BulkResponse response) {
logger.debug("[{}]: completed [{}] entry bulk request", task.getId(), requestSize);
onBulkResponse(response, onSuccess);
}