jnh5y commented on code in PR #12408: URL: https://github.com/apache/kafka/pull/12408#discussion_r925966739
########## streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java: ########## @@ -1474,7 +1482,7 @@ private void closeToError() { if (!setState(State.PENDING_ERROR)) { log.info("Skipping shutdown since we are already in " + state()); } else { - final Thread shutdownThread = shutdownHelper(true); + final Thread shutdownThread = shutdownHelper(true, Long.MAX_VALUE, false); Review Comment: What `timeoutMs`? There's no `timeoutMs` in scope. The method `closeToError` is called a few places; not sure if we could add a timeout to each of them... ########## streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java: ########## @@ -1521,43 +1529,35 @@ public synchronized boolean close(final CloseOptions options) throws IllegalArgu if (timeoutMs < 0) { throw new IllegalArgumentException("Timeout can't be negative."); } + log.debug("Stopping Streams client with timeoutMillis = {} ms.", timeoutMs); + return close(timeoutMs, options.leaveGroup); Review Comment: +1. -- 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