HBASE-30226 Avoid same-row reverse FuzzyRowFilter hints#8360
Open
EungsopYoo wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses a reverse-scan edge case in FuzzyRowFilter where a reverse seek hint can equal the current row, causing the scan to stop making progress (HBASE-30226). It refines the reverse-hint adjustment logic and adds a regression test to cover the problematic reverse scan sequence.
Changes:
- Prevent returning an adjusted reverse hint when it equals the current row, returning the unadjusted candidate instead.
- Update unit test expectations for reverse
getNextForFuzzyRulebehavior to reflect the new non-stalling hint. - Add an end-to-end regression test covering the
abc -> abb -> aaareverse scan progression case.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FuzzyRowFilter.java | Adjust reverse hint computation to avoid same-row hints that can stall reverse scans. |
| hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFuzzyRowFilter.java | Update reverse hint unit test expectations to ensure hints move backward when needed. |
| hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFuzzyRowFilterEndToEnd.java | Add an end-to-end regression test for reverse scan progress under FuzzyRowFilter. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
265
to
+268
| assertNext(true, new byte[] { 0, 1, 0, 0 }, // fuzzy row | ||
| new byte[] { 0, -1, 0, 0 }, // mask | ||
| new byte[] { 5, 1, (byte) 255, 1 }, // current | ||
| new byte[] { 5, 1, (byte) 255, 1 }); // expected next | ||
| new byte[] { 5, 1, (byte) 255, 0 }); // expected next |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Reverse
FuzzyRowFiltercan stop making progress when the reverse seek hint is equal to the current row. See HBASE-30226 for the detailed reproduction and analysis.What
This PR keeps the HBASE-28634 reverse hint adjustment for the normal case, but avoids returning the adjusted hint when it is equal to the current row.
It also adds an end-to-end regression test for the
abc -> abb -> aaareverse scan case.Test plan