HBASE-30256 FuzzyRowFilter mishandles the fuzzy-mask encoding on the …#8424
Open
liuxiaocs7 wants to merge 2 commits into
Open
HBASE-30256 FuzzyRowFilter mishandles the fuzzy-mask encoding on the …#8424liuxiaocs7 wants to merge 2 commits into
liuxiaocs7 wants to merge 2 commits into
Conversation
apache#8412) Signed-off-by: Dávid Paksy <paksyd@apache.org> Co-authored-by: Dávid Paksy <paksydavid@gmail.com> (cherry picked from commit 69d5102)
There was a problem hiding this comment.
Pull request overview
This PR addresses HBASE-30256 by fixing FuzzyRowFilter mask/key preprocessing so that the “no-unsafe” path correctly interprets and normalizes fuzzy-mask encodings (including legacy/v1 and unsafe peer encodings), and so that serialization/deserialization does not leak internal mask representations across platforms.
Changes:
- Normalize incoming masks on the no-unsafe path (including legacy unsafe encodings) and ensure non-fixed key bytes are cleared so hinting produces the smallest matching row.
- Make serialization (
toByteArray),getFuzzyKeys,equals, andhashCodeconsistently use the public{0 (fixed), 1 (non-fixed)}mask form. - Add end-to-end and wire-level tests covering unsafe/no-unsafe behavior, legacy/v1/v2 encodings, and round-trip/equality semantics.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FuzzyRowFilter.java |
Fixes mask normalization and preprocessing across unsafe/no-unsafe paths; ensures public-form masks are exposed/serialized and equality/hash semantics are consistent. |
hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFuzzyRowFilterWoUnsafe.java |
Adds comprehensive “no-unsafe” path coverage, including hinting and wire-format normalization cases. |
hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFuzzyRowFilter.java |
Adds unsafe-path regression tests for serialization leakage, equality/hash stability, and v1/v2 wire behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
…… (#8412)
(cherry picked from commit 69d5102)