You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Geoffrey Jacoby (Jira)" <ji...@apache.org> on 2020/02/19 00:24: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=17039585#comment-17039585 ] 

Geoffrey Jacoby commented on HBASE-22710:
-----------------------------------------

[~zhangduo], [~filtertip] Any update on HBASE-22710? 

We've recently encountered this bug in the 2.x-based branches of Phoenix where our secondary-index building code recently changed to use a Phoenix-specific Filter (SkipScanFilter) and a raw scan. See PHOENIX-5736. The change to use the SkipScanFilter gave us a nice perf boost, and we'd really prefer to avoid reverting if we can avoid it. 

To Duo's point about whether Filters should support raw scans: I think the answer has to be yes, because there are valid cases where someone might want to use a _particular_ Filter or Filters and a raw scan. However, it also makes sense to me that not _all_ Filters may be valid in a raw Scan context. 

As separate work, perhaps we could add a supportsRawScan() method to Filter (with a default impl of true in FilterBase for backwards compatibility), and if the query matcher catches a raw Scan using a Filter with supportsRawScan returning false, the client gets back a helpful non-retriable exception. That way at least there are no surprises, and no silently-returning-wrong-answers, which is the current behavior. 

> 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 Wang
>            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
(v8.3.4#803005)