vamossagar12 commented on code in PR #11211:
URL: https://github.com/apache/kafka/pull/11211#discussion_r852939284
##########
streams/src/main/java/org/apache/kafka/streams/state/internals/AbstractRocksDBSegmentedBytesStore.java:
##########
@@ -87,23 +90,35 @@ public KeyValueIterator<Bytes, byte[]> backwardFetch(final
Bytes key,
return fetch(key, from, to, false);
}
+
KeyValueIterator<Bytes, byte[]> fetch(final Bytes key,
final long from,
final long to,
final boolean forward) {
- final List<S> searchSpace = keySchema.segmentsToSearch(segments, from,
to, forward);
- final Bytes binaryFrom = keySchema.lowerRangeFixedSize(key, from);
+ final long actualFrom = getActualFrom(from);
+
+ if (keySchema instanceof WindowKeySchema && to < actualFrom) {
+ return KeyValueIterators.emptyIterator();
Review Comment:
Yeah.. so for the case of WindowKeySchema, if to < from, the underlying code
throws IllegalArguementException while that's not the case for SessionKeySchema
and other kinds of schema.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]