HBASE-27691 Prevent filters from seeing synthetic scan start cells#8485
Open
noslowerdna wants to merge 1 commit into
Open
HBASE-27691 Prevent filters from seeing synthetic scan start cells#8485noslowerdna wants to merge 1 commit into
noslowerdna wants to merge 1 commit into
Conversation
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.
HBASE-27691
What changes were proposed in this pull request?
This patch disables
StoreScanner's initial lazy seek for filtered non-Get scans. Doing so prevents synthetic lazy-seek Cells from being exposed to server-side Filters and Comparators, while retaining lazy seeking for unfiltered Scans and Gets.Why are the changes needed?
A region start boundary is not guaranteed to be a valid application row key. Passing its synthetic Cell to a
RowFiltercomparator violates the Filter contract thatfilterRowKeyreceives the first actual Cell of a row and can result in unexpected exceptions when Filter / Comparator code attempts to parse a seemingly truncated or otherwise malformed row key.In our case that manifested like this:
This change reinstates the protection intended by HBASE-6562, using its later proposed (unmerged) eager initial seek patch.
How was this patch tested?
A ROWCOL Bloom regression test verifies that a Comparator sees only the persisted row, not a synthetic region-boundary Cell. Focused tests also cover each lazy-seek decision branch.
mvn -ntp -pl hbase-server -am \ -Dtest=TestScanner \ -Dsurefire.failIfNoSpecifiedTests=false \ test