-
Couldn't load subscription status.
- Fork 3.4k
HBASE-28634 Fix FuzzyRowFilter may not return data on reverse scans #6457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HBASE-28634 Fix FuzzyRowFilter may not return data on reverse scans #6457
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
9abb459 to
ed2e4a5
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
In the latest PR build two unit tests failed:
For me, these look unrelated and I was able to successfully run these tests locally. |
ed2e4a5 to
c03e416
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Reproduced the issue with a mini cluster test.
Some expectations were not correct. Also extracted PrefixFilter.increaseLastNonMaxByte() method to PrivateCellUtil so that it can be reused in FuzzyRowFilter.
…() when the hint should contain a 0xFF As a start, when we have a reverse scan, we not only need trailing 0xff's instead of trailing 0x00's, but it seems we always need 0xff's instead of the 0x00's.
…GetNextForFuzzyRuleForward
to not start another minicluster needlessly.
c03e416 to
348b364
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 LGTM
hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFuzzyRowFilter.java
Outdated
Show resolved
Hide resolved
| @Override | ||
| public ReturnCode filterCell(final Cell c) { | ||
| final int startIndex = lastFoundIndex >= 0 ? lastFoundIndex : 0; | ||
| final int startIndex = Math.max(lastFoundIndex, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have checked, this compiles to the same inline, so it's not a performance problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks. 👍
Yes, this line change was not because of performance. Actually here just IntelliJ IDEA suggested to replace this to make it simpler to understand. It can be reverted if needed.
|
Thank you. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
As the comment did not make much sense without the mask and current row.
|
🎊 +1 overall
This message was automatically generated. |
|
Prepared a backport PR for |
…6457) Signed-off-by: Istvan Toth <[email protected]> (cherry picked from commit a735eff)
The FuzzyRowFilter reverse scan related code was added under HBASE-12183.
My Changes:
TestFuzzyRowFilteras some expectations were not correct.FuzzyRowFilter.getNextForFuzzyRule()in the reverse case:PrefixFilter.increaseLastNonMaxByte()method toPrivateCellUtilso that it can be reused inFuzzyRowFilter.0xFF. As a start, when we have a reverse scan, we not only need trailing0xff's instead of trailing0x00's, but it seems we always need0xff's instead of the0x00's.FuzzyRowFilterwhich IntelliJ IDEA suggested (final fields, simplifications).