wcarlson5 commented on a change in pull request #9875:
URL: https://github.com/apache/kafka/pull/9875#discussion_r556094266



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java
##########
@@ -824,7 +826,9 @@ private long pollPhase() {
         final long pollLatency = advanceNowAndComputeLatency();
 
         final int numRecords = records.count();
-        log.info("Main Consumer poll completed in {} ms and fetched {} 
records", pollLatency, numRecords);
+        if (numRecords > 0) {

Review comment:
       The above probably doesn't need to be applied here as well, i don't think

##########
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java
##########
@@ -749,9 +749,11 @@ void runOnce() {
             // multiple iterations with reasonably large max.num.records and 
hence is less vulnerable to outliers
             taskManager.recordTaskProcessRatio(totalProcessLatency, now);
 
-            log.info("Processed {} total records, ran {} punctuators, and 
committed {} total tasks " +
-                        "for active tasks {} and standby tasks {}",
-                     totalProcessed, totalPunctuated, totalCommitted, 
taskManager.activeTaskIds(), taskManager.standbyTaskIds());
+            // Don't log summary if no new records were processed to avoid 
spamming logs for low-traffic topics
+            if (totalProcessed > 0 || totalPunctuated > 0 || totalCommitted > 
0) {
+                log.info("Processed {} total records, ran {} punctuators, and 
committed {} total tasks",

Review comment:
       Maybe we do this else where but can we log at DEBUG if there is nothing 
done and there is tasks assigned to the thread? It might be good to be able to 
confirm that its not getting stuck here or its actually not polling anything.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to