patrickstuedi commented on a change in pull request #11120:
URL: https://github.com/apache/kafka/pull/11120#discussion_r677285658



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBRangeIterator.java
##########
@@ -63,17 +65,20 @@
         final KeyValue<Bytes, byte[]> next = super.makeNext();
         if (next == null) {
             return allDone();
+        } else if (rawLastKey == null) {
+            return next;
+
         } else {
             if (forward) {
-                if (comparator.compare(next.key.get(), rawLastKey) < 0) {
+                if (rawLastKey != null && comparator.compare(next.key.get(), 
rawLastKey) < 0) {

Review comment:
       Good catch. Yes this check can be eliminated now that there is a common 
null check in the beginning. 




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