hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Elser (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-15676) FuzzyRowFilter fails and matches all the rows in the table if the mask consists of all 0s
Date Thu, 10 Aug 2017 21:37:00 GMT

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

Josh Elser commented on HBASE-15676:
------------------------------------

Better late than never, but I just noticed that this change introduced an incompatibility
around filters that contain the {{any}} byte (1). This changed the serialized form from {{0}}
to {{2}}. e.g. a 1.1.4 client cannot successfully fuzzy row filter against a 1.1.5 server
and vice versa.

Not sure how we want to rectify (if at all) given it's been over a year.

> FuzzyRowFilter fails and matches all the rows in the table if the mask consists of all
0s
> -----------------------------------------------------------------------------------------
>
>                 Key: HBASE-15676
>                 URL: https://issues.apache.org/jira/browse/HBASE-15676
>             Project: HBase
>          Issue Type: Bug
>          Components: Filters
>    Affects Versions: 2.0.0, 0.98.13, 1.0.2, 1.2.0, 1.1.1
>            Reporter: Rohit Sinha
>            Assignee: Matt Warhaftig
>             Fix For: 2.0.0, 1.3.0, 1.4.0, 1.1.5, 1.2.2, 0.98.20
>
>         Attachments: hbase-15287-0.98-v1.patch, hbase-15676-v1.patch, hbase-15676-v2.patch,
hbase-15676-v3.patch, hbase-15676-v4.patch
>
>
> While using FuzzyRowFilter we noticed that if the mask array consists of all 0s (fixed)
the FuzzyRowFilter matches all the rows in the table. We noticed this on HBase 1.1, 1.2 and
higher.
> After some digging we suspect that this is because of isPreprocessedMask() check which
is used in preprocessMask() which was added here: https://issues.apache.org/jira/browse/HBASE-13761
> If the mask consists of all 0s then the isPreprocessedMask() returns true and the preprocessing
which responsible for changing 0s to -1 doesn't happen and hence all rows are matched in scan.
> This scenario can be tested in TestFuzzyRowFilterEndToEnd#testHBASE14782() If we change
the 
> byte[] fuzzyKey = Bytes.toBytesBinary("\\x00\\x00\\x044");
> byte[] mask = new byte[] {1,0,0,0};
> to 
> byte[] fuzzyKey = Bytes.toBytesBinary("\\x9B\\x00\\x044e");
> byte[] mask = new byte[] {0,0,0,0,0};
> We expect one match but this will match all the rows in the table. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message