apalan60 commented on code in PR #19394:
URL: https://github.com/apache/kafka/pull/19394#discussion_r2047945194
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java:
##########
@@ -869,8 +870,10 @@ public void setStreamsUncaughtExceptionHandler(final
BiConsumer<Throwable, Boole
public void maybeSendShutdown() {
if (assignmentErrorCode.get() ==
AssignorError.SHUTDOWN_REQUESTED.code()) {
- log.warn("Detected that shutdown was requested. " +
+ if (shutDownRequested.compareAndSet(false, true)) {
+ log.warn("Detected that shutdown was requested. " +
"All clients in this app will now begin to shutdown");
+ }
mainConsumer.enforceRebalance("Shutdown requested");
Review Comment:
Thanks for the suggestion, this is a better approach, it preserves the
original behavior of continuously logging shutdown-in-progress signals, while
significantly reducing log noise. I've updated the implementation to use an
```AtomicLong``` and now the shutdown warning will be logged at most once every
10 seconds.
--
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]