wcarlson5 commented on a change in pull request #9695:
URL: https://github.com/apache/kafka/pull/9695#discussion_r555138077



##########
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:
       there is a very small window between when thread dies with the old 
handler and when it is removed from the the list. So we have to check to make 
sure for now




----------------------------------------------------------------
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


Reply via email to