vcrfxia commented on code in PR #13142: URL: https://github.com/apache/kafka/pull/13142#discussion_r1085933946
########## streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBStore.java: ########## @@ -351,13 +360,23 @@ public <R> QueryResult<R> query( @Override public <PS extends Serializer<P>, P> KeyValueIterator<Bytes, byte[]> prefixScan(final P prefix, final PS prefixKeySerializer) { + if (userManagedIterators) { + throw new IllegalStateException("Must specify openIterators in call to prefixScan()"); + } + return prefixScan(prefix, prefixKeySerializer, openIterators); + } + + <PS extends Serializer<P>, P> KeyValueIterator<Bytes, byte[]> prefixScan(final P prefix, + final PS prefixKeySerializer, + final Set<KeyValueIterator<Bytes, byte[]>> openIterators) { Review Comment: No, that's a good point. I've just added this additional validation, which required refactoring these calls so that the two versions of the method do not call each other. Instead they each call a third (helper) method. -- 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