Make batch segment allocation logs less noisy (#13725)

This commit is contained in:
Kashif Faraz 2023-02-02 09:54:53 +05:30 committed by GitHub
parent 33efd5ab1d
commit 7c188d80b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 6 deletions

View File

@ -262,16 +262,14 @@ public class SegmentAllocationQueue
{
clearQueueIfNotLeader();
// Process all batches which are due
log.debug("Processing batches which are due. Queue size [%d].", processingQueue.size());
int numProcessedBatches = 0;
AllocateRequestKey nextKey = processingQueue.peekFirst();
while (nextKey != null && nextKey.isDue()) {
processingQueue.pollFirst();
AllocateRequestBatch nextBatch = keyToBatch.remove(nextKey);
// Process the next batch in the queue
boolean processed;
AllocateRequestBatch nextBatch = keyToBatch.remove(nextKey);
try {
processed = processBatch(nextBatch);
}
@ -301,7 +299,7 @@ public class SegmentAllocationQueue
nextScheduleDelay = Math.max(0, maxWaitTimeMillis - timeElapsed);
}
scheduleQueuePoll(nextScheduleDelay);
log.info("Processed [%d] batches, next execution in [%d ms]", numProcessedBatches, nextScheduleDelay);
log.debug("Processed [%d] batches, next execution in [%d ms]", numProcessedBatches, nextScheduleDelay);
}
/**
@ -358,7 +356,6 @@ public class SegmentAllocationQueue
log.info("Successfully processed [%d / %d] requests in batch [%s].", successCount, batchSize, requestKey);
if (requestBatch.isEmpty()) {
log.debug("All requests in batch [%s] have been processed.", requestKey);
return true;
}