bsglz commented on a change in pull request #767:
URL: https://github.com/apache/hbase/pull/767#discussion_r415288472



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/ScanQueryMatcher.java
##########
@@ -372,10 +372,11 @@ protected static Cell createStartKeyFromRow(byte[] 
startRow, ScanInfo scanInfo)
     if (userScan != null) {
       if (userScan.isRaw()) {
         resultMaxVersion = userScan.getMaxVersions();
+        maxVersionToCheck = userScan.getMaxVersions();
       } else {
         resultMaxVersion = Math.min(userScan.getMaxVersions(), 
scanInfo.getMaxVersions());
+        maxVersionToCheck = userScan.hasFilter() ? scanInfo.getMaxVersions() : 
resultMaxVersion;

Review comment:
       This logic is existing before this pr, but it did not choose the right 
versions when use raw.
   
   I summarize the logic as below:
   ##**scan type**##        ##**maxVersionToCheck**##   ##**resultMaxVersion**##
   common w/o filter   ,min(userScan,scanInfo)  ,min(userScan,scanInfo)
   common w/ filter    ,scanInfo               ,userScan
   raw w/o filter      ,userScan                                ,userScan
   raw w/ filter       ,Integer.MAX_VALUE      ,userScan
   
   
   If i am right, the existing logic need two changes;
   1: In isRaw=true branch, set maxVersionToCheck as Integer.MAX_VALUE;
   2: Move the line with userScan.hasFilter() into isRaw=false branch;




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to