ableegoldman commented on a change in pull request #10921:
URL: https://github.com/apache/kafka/pull/10921#discussion_r672764087



##########
File path: streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java
##########
@@ -1081,6 +1079,7 @@ private int getNumStreamThreads(final boolean 
hasGlobalTopology) {
                             } else {
                                 log.info("Successfully removed {} in {}ms", 
streamThread.getName(), time.milliseconds() - startMs);
                                 threads.remove(streamThread);
+                                queryableStoreProvider.removeStoreProvider(new 
StreamThreadStateStoreProvider(streamThread));

Review comment:
       Ah, yeah I guess it would have always had to handle `DEAD` threads since 
in the before-time (ie before we added the `add/removeStreamThread` APIs) it 
was always possible for a thread to just die when hit with an unexpected 
exception.
   
   That said, I feel a lot better about trimming a removed thread from the list 
explicitly. Don't want to build up a mass grave of mostly dead threads (well, 
dead thread store providers) that can never be garbage collected over the 
application's lifetime




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


Reply via email to