You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/07/16 08:35:53 UTC

[GitHub] [kafka] PhilHardwick commented on a change in pull request #10921: KAFKA-13096: Ensure queryable store providers is up to date after adding stream thread

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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org