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

Thibault Deutsch edited comment on HBASE-12222 at 7/7/23 8:52 AM:
------------------------------------------------------------------

Got hit by this bug recently. Same issue as the example:
 * our rowkey are variable in length
{code:java}
<<salt::1, id::varint, rest::binary>> {code}

 * we want to match on a few specific bytes in the rowkey, generally in the 
"rest" part (see above)
 * since the ID is encoded with variable size (bad decision on our side here), 
it can happen that we have some rowkey smaller than our Fuzzy mask
 * the FuzzyRowFilter surprisingly doesn't enforce that the rowkey is at 
minimum the length of the mask (or at least the length of the mask up to the 
last *fixed* byte)

This behaviour seems wrong to me. I would be happy to propose a fix if we agree 
that this should be fixed (and if not, at minimum documented).

[~apurtell] would you be happy to re-open the bug?


was (Author: JIRAUSER301236):
Got hit by this bug recently. Same issue as the example:
 * our rowkey are variable in length
{code:java}
<<salt::1, id::varint, other::binary>> {code}

 * we want to match on a few specific bytes in the rowkey, generally in part of 
the binary
 * since the ID is encoded with variable size (bad decision on our side here), 
it can happen that we have some rowkey smaller than our Fuzzy mask
 * the FuzzyRowFilter surprisingly doesn't enforce that the rowkey is at 
minimum the length of the mask (or at least the length of the mask up to the 
last *fixed* byte)

This behaviour seems wrong to me. I would be happy to propose a fix if we agree 
that this should be fixed (and if not, at minimum documented).

[~apurtell] would you be happy to re-open the bug?

> FuzzyRowFilter unpredictable with jagged rowkeys
> ------------------------------------------------
>
>                 Key: HBASE-12222
>                 URL: https://issues.apache.org/jira/browse/HBASE-12222
>             Project: HBase
>          Issue Type: Bug
>          Components: Filters
>            Reporter: Nick Dimiduk
>            Priority: Major
>         Attachments: 12222_tests.patch
>
>
> FuzzyRowFilter getNextCellHint doesn't take into account jagged rowkeys and 
> produces surprising results. For example, given a table of
> {noformat}
> 0
> 0/0
> 0/1
> 0/2
> 1
> 1/0
> 1/1
> 1/2
> 2
> 2/0
> 2/1
> 2/2
> {noformat}
> and FuzzyPrefixFilter like "?/2", {1, 0, 0}
> I would expect
> {noformat}
> 0/2
> 1/2
> 2/2
> {noformat}
> The results include the rows '0', '1', and '2'



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to