keyserbrian1 commented on a change in pull request #3639:
URL: https://github.com/apache/hbase/pull/3639#discussion_r697804937



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
##########
@@ -737,7 +737,10 @@ public boolean next(List<Cell> outResult, ScannerContext 
scannerContext) throws
 
           case SEEK_NEXT_USING_HINT:
             Cell nextKV = matcher.getNextKeyHint(cell);
-            if (nextKV != null && comparator.compare(nextKV, cell) > 0) {
+            if (nextKV != null &&
+              ((!scan.isReversed() && comparator.compare(nextKV, cell) > 0)

Review comment:
       Java's && short-circuits, so the comparison is only ever actually run 
once. If the `isReversed` check (either the normal or the negated) fails, we 
don't do the associated comparison.
   
   However, I agree that it would be clearer that only one comparison is 
performed if we store the result. Updated.
   
   I also removed the extraneous `@throws` doc tags; they were left over when 
copying from `TestFuzzyRowFilterEndToEnd`.
   
   P. S. Do you know why GitHub says there were test failures, but the linked 
"details" page doesn't report any (besides a known failure)?




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


Reply via email to