mjsax commented on code in PR #20693:
URL: https://github.com/apache/kafka/pull/20693#discussion_r2496663975


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/PartitionGroup.java:
##########
@@ -105,47 +106,49 @@ boolean readyToProcess(final long wallClockTime) {
                         bufferedPartitions.add(entry.getKey());
                     }
                 }
-                logger.trace("Ready for processing because max.task.idle.ms is 
disabled." +
-                                "\n\tThere may be out-of-order processing for 
this task as a result." +
-                                "\n\tBuffered partitions: {}" +
-                                "\n\tNon-buffered partitions: {}",
-                        bufferedPartitions,
-                        emptyPartitions);
+                logMessage = Optional.of(String.format(
+                    "Ready for processing because max.task.idle.ms is 
disabled.%n" +
+                        "\tThere may be out-of-order processing for this task 
as a result.%n" +
+                        "\tBuffered partitions: %s%n" +
+                        "\tNon-buffered partitions: %s",
+                    bufferedPartitions,
+                    emptyPartitions
+                ));
             }
-            return true;
+            return new ReadyToProcessResult(true, logMessage);
         }
 
         final Set<TopicPartition> queued = new HashSet<>();
         Map<TopicPartition, Long> enforced = null;
+        final StringBuilder logMessageBuilder = new StringBuilder();
 
         for (final Map.Entry<TopicPartition, RecordQueue> entry : 
partitionQueues.entrySet()) {
             final TopicPartition partition = entry.getKey();
             final RecordQueue queue = entry.getValue();
 
-
             if (!queue.isEmpty()) {
                 // this partition is ready for processing
+                appendLog(logMessageBuilder, String.format("Partition %s has 
buffered data, ready for processing", partition));

Review Comment:
   Similar to my commend above: for the positive case (we do return `true` 
later, we don't really care. We would still log at TRACE directly, but the 
actually interesting case is the "false" case).
   
   Applies further below, too.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to