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



##########
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:
       The test actually passes with this line commented out, this is because 
in StreamThreadStateStoreProvider it deals with having dead threads left in 
there - 
https://github.com/apache/kafka/blob/4fd6d2bec8a6249e211b9769e887cc24d5cf1444/streams/src/main/java/org/apache/kafka/streams/state/internals/StreamThreadStateStoreProvider.java#L47.
 So without this line this if condition gets hit. With this 
`removeStoreProvider` this condition isn't hit, so it's a small optimisation. 




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


Reply via email to