From 7c188d80b848416b5ac4fed17373b41c39d819b8 Mon Sep 17 00:00:00 2001 From: Kashif Faraz Date: Thu, 2 Feb 2023 09:54:53 +0530 Subject: [PATCH] Make batch segment allocation logs less noisy (#13725) --- .../indexing/common/actions/SegmentAllocationQueue.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/indexing-service/src/main/java/org/apache/druid/indexing/common/actions/SegmentAllocationQueue.java b/indexing-service/src/main/java/org/apache/druid/indexing/common/actions/SegmentAllocationQueue.java index d60149d6245..d7ab0fd21fd 100644 --- a/indexing-service/src/main/java/org/apache/druid/indexing/common/actions/SegmentAllocationQueue.java +++ b/indexing-service/src/main/java/org/apache/druid/indexing/common/actions/SegmentAllocationQueue.java @@ -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; }