You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Zheng Wang (JIRA)" <ji...@apache.org> on 2019/08/09 10:43:00 UTC

[jira] [Commented] (HBASE-22710) Wrong result in one case of scan that use raw and versions and filter together

    [ https://issues.apache.org/jira/browse/HBASE-22710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16903798#comment-16903798 ] 

Zheng Wang commented on HBASE-22710:
------------------------------------

Maybe the problem is here.

 
{code:java}
ScanQueryMatcher.java
getTrackers()
{
...

if (userScan != null) {
  if (userScan.isRaw()) {
    resultMaxVersion = userScan.getMaxVersions();
  } else {
    resultMaxVersion = Math.min(userScan.getMaxVersions(), scanInfo.getMaxVersions());
  }
  //here
  maxVersionToCheck = userScan.hasFilter() ? scanInfo.getMaxVersions() : resultMaxVersion;
}
...
}{code}
The scanInfo.getMaxVersions() return 1,it is from the column family 's define, the resultMaxVersion is 2,it is from scan requset.

But i don't understand why the filter should effect maxVersion?

 

> Wrong result in one case of scan that use  raw and versions and filter together
> -------------------------------------------------------------------------------
>
>                 Key: HBASE-22710
>                 URL: https://issues.apache.org/jira/browse/HBASE-22710
>             Project: HBase
>          Issue Type: Bug
>          Components: Scanners
>    Affects Versions: 2.0.0
>            Reporter: Zheng Wang
>            Assignee: Zheng Hu
>            Priority: Major
>
> create 'testScanRaw',\{NAME => 'f', VERSIONS => 1}
>  
> put 'testScanRaw','r1','f:q','1'
> put 'testScanRaw','r1','f:q','2'
> put 'testScanRaw','r1','f:q','3'
>  
> hbase(main):005:0> scan 'testScanRaw',\{RAW => true, STARTROW => 'r1', STOPROW=>'r1',VERSIONS=>2}
> ROW COLUMN+CELL
> r1 column=f:q, timestamp=1563430154757, value=3
> r1 column=f:q, timestamp=1563430153120, value=2
>  
> hbase(main):006:0> scan 'testScanRaw',\{RAW => true, STARTROW => 'r1', STOPROW=>'r1',VERSIONS=>2,FILTER => "(QualifierFilter (=, 'binary:q'))"}
> ROW COLUMN+CELL
> r1 column=f:q, timestamp=1563430154757, value=3
>  
> BTW,the result is right in hbase1.2.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)