dima5rr commented on a change in pull request #8706: URL: https://github.com/apache/kafka/pull/8706#discussion_r431687179
########## File path: streams/src/main/java/org/apache/kafka/streams/state/internals/QueryableStoreProvider.java ########## @@ -58,9 +58,21 @@ public QueryableStoreProvider(final List<StreamThreadStateStoreProvider> storePr } final List<T> allStores = new ArrayList<>(); for (final StreamThreadStateStoreProvider storeProvider : storeProviders) { - allStores.addAll(storeProvider.stores(storeQueryParameters)); + final List<T> stores = storeProvider.stores(storeQueryParameters); + if (stores != null && !stores.isEmpty()) { + allStores.addAll(stores); + if (storeQueryParameters.partition() != null) { + break; + } + } } if (allStores.isEmpty()) { + if (storeQueryParameters.partition() != null) { Review comment: I extended StateStoreProviderStub functionality to add store by partition with default partition 0, + relevant tests in QueryableStoreProviderTest ---------------------------------------------------------------- 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