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 2022/04/19 11:36:42 UTC
[GitHub] [kafka] vamossagar12 commented on a diff in pull request #11211: KAFKA-12960: Enforcing strict retention time for WindowStore and Sess…
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org