You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2021/08/28 02:04:35 UTC

[GitHub] [hbase] Apache9 commented on a change in pull request #3639: SEEK_NEXT_USING_HINT is ignored on reversed Scans [HBASE-26232]

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



##########
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:
       Let's only do one compare and record the result and use it in the if condition? Here we are on the critial read path, so let's try to avoid extra compare as much as possible.




-- 
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: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org