apalan60 opened a new pull request, #19394: URL: https://github.com/apache/kafka/pull/19394
## Summary [JIRA: KAFKA-19054](https://issues.apache.org/jira/browse/KAFKA-19054) Under the `SHUTDOWN_APPLICATION` configuration in Kafka Streams, a tight loop in the shutdown process can flood logs with repeated messages. This PR introduces a check to ensure that the shutdown log is emitted only once, thereby preventing log flooding. ## Changes Added logic in `maybeSendShutdown()` to verify whether the shutdown process has already been initiated. ## Validation I validated this change by comparing the log outputs in the test case [StreamsUncaughtExceptionHandlerIntegrationTest.shouldShutdownMultipleThreadApplication](https://github.com/apache/kafka/blob/e69a31106879dc5eaf8e80f1fe0c05422488df49/streams/integration-tests/src/test/java/org/apache/kafka/streams/integration/StreamsUncaughtExceptionHandlerIntegrationTest.java#L175C17-L175C56) before[0] and after[1] the modification. Before the change, my local environment produced the log message "Detected that shutdown was requested. All clients in this app will now begin to shutdown" almost 100 times, whereas after the change it is emitted only once. --- - [0] [before.txt](https://github.com/user-attachments/files/19622620/before.txt) - [1] [after.txt](https://github.com/user-attachments/files/19622622/after.txt) -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org