aliehsaeedii commented on code in PR #14957:
URL: https://github.com/apache/kafka/pull/14957#discussion_r1420466908


##########
streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBVersionedStoreSegmentValueFormatter.java:
##########
@@ -150,7 +152,15 @@ interface SegmentValue {
          */
         SegmentSearchResult find(long timestamp, boolean includeValue);
 
-        List<SegmentSearchResult> findAll(long fromTime, long toTime);
+        /**
+         * Finds the next/previous record in this segment row that is valid 
within the query specified time range
+         *
+         * @param fromTime the query starting time point
+         * @param toTime the query ending time point
+         * @param order specifies the order (based on timestamp) in which 
records are returned
+         * @return the record that is found, null if no record is found
+         */
+        SegmentSearchResult find(long fromTime, long toTime, ResultOrder 
order);

Review Comment:
   > I am wondering if existing `find()` and the new `find()` can be called 
interleaved without breaking anything?
   > 
   > So far, `PartiallyDeserializedSetmentValue` is already lazy and 
deserializes from newest to oldest. It would be a difficult API contract if 
calling existing `find` and new `find` interleaved would break anything?
   
   A very good question. I think we need a sync session about that?



-- 
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

Reply via email to