ableegoldman commented on a change in pull request #9695: URL: https://github.com/apache/kafka/pull/9695#discussion_r553023675
########## File path: streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java ########## @@ -992,7 +992,7 @@ private StreamThread createStreamThread(final long cacheSizePerThread, final int if (isRunningOrRebalancing()) { synchronized (changeThreadCount) { for (final StreamThread streamThread : threads) { - if (streamThread.isAlive()) { + if (streamThread.isAlive() && (!streamThread.getName().equals(Thread.currentThread().getName()) || threads.size() == 1)) { Review comment: I guess technically this might not work if we have only one live thread left, but other dead threads still in the list -- in that case we might skip over the live thread when we really should have removed it. I'm not sure how much of a problem this would really be, just wanted to point it out. ---------------------------------------------------------------- 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