eatmoreduck opened a new pull request, #24203: URL: https://github.com/apache/kafka/pull/24203
`StreamTask#isProcessable` logs every not-ready reason at INFO, throttled to one line per 120s per task. For an idle task the most frequent reason is that no partition has buffered records, or that the task is still waiting on the `max.task.idle.ms` deadline. Both are normal states of a low-volume or bursty topic: before 4.2.0 (`KAFKA-19682` / #20693) `PartitionGroup` logged these at TRACE, and the INFO promotion made an idle application log one line per idle task every two minutes indefinitely, with no action for the operator to take. `ReadyToProcessResult` now marks not-ready results that describe normal idling, and `StreamTask#maybeLogNotReady` logs those at DEBUG. States that indicate the task is waiting to fetch metadata or to poll records known to be on the broker (`fetched lag == -1`, `fetched lag > 0`) keep the INFO level, as does the pending-transaction-commit case, since those report progress the operator can act on. Testing: - `PartitionGroupTest#shouldMarkNormalIdlingAsLogAtDebug` covers the four not-ready shapes (lag unknown, lag > 0, idling inside the window, no data buffered after the deadline) and asserts the level marker per shape. - `StreamTaskTest#shouldLogIdleNotReadyAtDebugAfterThreshold` drives `isProcessable` past the 120s threshold on an idle task and asserts the message appears at DEBUG while nothing is logged at INFO; the existing `shouldLogNotReadyWhenStaleAfterThreshold` keeps covering the INFO path. - `PartitionGroupTest`, `StreamTaskTest` (113 tests) and `SynchronizedPartitionGroupTest` pass. -- 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]
