vvcephei commented on a change in pull request #9489: URL: https://github.com/apache/kafka/pull/9489#discussion_r522203482
########## File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java ########## @@ -703,6 +703,16 @@ void runOnce() { // we record the ratio out of the while loop so that the accumulated latency spans over // multiple iterations with reasonably large max.num.records and hence is less vulnerable to outliers taskManager.recordTaskProcessRatio(totalProcessLatency, now); + + // Only log this at INFO when we actually processed some records to avoid flooding INFO-level logs when + // there are no records on the input topics + if (totalProcessed > 0) { + log.info("Processed {} records for tasks {}, polling for more records now", + totalProcessed, taskManager.activeTaskIds()); + } else { + log.debug("Processed {} records for tasks {}, polling for more records now", Review comment: This line looks about the same as L665. I'm wondering if we really need the "else" in this case. ########## File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java ########## @@ -703,6 +703,16 @@ void runOnce() { // we record the ratio out of the while loop so that the accumulated latency spans over // multiple iterations with reasonably large max.num.records and hence is less vulnerable to outliers taskManager.recordTaskProcessRatio(totalProcessLatency, now); + + // Only log this at INFO when we actually processed some records to avoid flooding INFO-level logs when + // there are no records on the input topics + if (totalProcessed > 0) { + log.info("Processed {} records for tasks {}, polling for more records now", Review comment: Since this is at the end of runOnce, I'm wondering if it also makes sense to log whether we committed or punctuated, and whether/how many records we polled at the beginning of the method. Basically, it seems like, if it's a good idea to log some information once per cycle, then it's probably a good idea to summarize everything you'd want to know. ---------------------------------------------------------------- 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