[
https://issues.apache.org/jira/browse/HBASE-17890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15979933#comment-15979933
]
Chia-Ping Tsai commented on HBASE-17890:
----------------------------------------
bq. Could you explain why the origin TestFuzzyRowAndColumnRangeFilter and
TestFuzzyRowFilterEndToEnd fail if unaligned support is false, and just do
minimum to make them pass? Do they always fail?
They fail due to FuzzyRowFilter#getNextForFuzzyRule. It use the -1/0 as
fixed/non-fixed byte, but the correct byte is 0/1 if the unsafe is disabled.
The FuzzyRowFilter#filterKeyValue is another reason.
{code}
@Override
public ReturnCode filterKeyValue(Cell c) {
// This shift is idempotent - always end up with 0 and -1 as mask values.
for (int j = 0; j < fuzzyData.getSecond().length; j++) {
fuzzyData.getSecond()[j] >>= 2;
}
}
{code}
It only think about unsafe, and it will convert the non-fixed byte(1) to 0.
> FuzzyRow tests fail if unaligned support is false
> -------------------------------------------------
>
> Key: HBASE-17890
> URL: https://issues.apache.org/jira/browse/HBASE-17890
> Project: HBase
> Issue Type: Sub-task
> Affects Versions: 2.0.0, 1.2.5
> Reporter: Jerry He
> Assignee: Chia-Ping Tsai
> Fix For: 2.0.0, 1.4.0, 1.2.6, 1.3.2
>
> Attachments: HBASE-17890.v0.branch-1.patch, HBASE-17890.v0.patch,
> HBASE-17890.v1.branch-1.patch, HBASE-17890.v1.patch, HBASE-17890.v2.patch,
> HBASE-17890.v3.patch, HBASE-17890.v3.patch, HBASE-17890.v3.patch,
> HBASE-17890.v3.patch, HBASE-17890.v3.patch
>
>
> When unaligned support is false, FuzzyRow tests fail:
> {noformat}
> Failed tests:
> TestFuzzyRowAndColumnRangeFilter.Test:134->runTest:157->runScanner:186
> expected:<10> but was:<0>
> TestFuzzyRowFilter.testSatisfiesForward:81 expected:<YES> but was:<NO_NEXT>
> TestFuzzyRowFilter.testSatisfiesReverse:121 expected:<YES> but
> was:<NEXT_EXISTS>
> TestFuzzyRowFilterEndToEnd.testEndToEnd:247->runTest1:278->runScanner:343
> expected:<6250> but was:<0>
> TestFuzzyRowFilterEndToEnd.testFilterList:385->runTest:417->runScanner:445
> expected:<5> but was:<0>
> TestFuzzyRowFilterEndToEnd.testHBASE14782:204 expected:<6> but was:<0>
> {noformat}
> This can be reproduced in the case described in HBASE-17869. Or on a platform
> really without unaligned support.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)