ableegoldman commented on a change in pull request #10921: URL: https://github.com/apache/kafka/pull/10921#discussion_r673585765
########## File path: streams/src/main/java/org/apache/kafka/streams/state/internals/QueryableStoreProvider.java ########## @@ -56,8 +60,16 @@ public QueryableStoreProvider(final List<StreamThreadStateStoreProvider> storePr return queryableStoreType.create(globalStoreProvider, storeName); } return queryableStoreType.create( - new WrappingStoreProvider(storeProviders, storeQueryParameters), + new WrappingStoreProvider(new ArrayList<>(storeProviders.values()), storeQueryParameters), Review comment: Hmm...I'm a little less sure about this, but I think we should make sure that WrappingStoreProvider's view of the stream thread storeProviders also stays up to date when threads are added/removed. Basically if a user calls KafkaStreams.store() then adds/removes a bunch of threads without refreshing the store provider, any subsequent get() on that provider would only see the threads that existed at the time KAfkaStreams.store() was called if we make a copy like this. We should be able to just modify the WrappingStoreProvider constructor/local field to be a Set or even a Collection instead, since all it ever does is loop over this. Then we can just pass in storeProviders.values() and it's all good -- 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