HBASE-30351 ROWS_SCANNED scan metric double-counts rows passing the filter when the scan uses the joined heap - #8596
Open
eomiks wants to merge 1 commit into
Open
HBASE-30351 ROWS_SCANNED scan metric double-counts rows passing the filter when the scan uses the joined heap#8596eomiks wants to merge 1 commit into
eomiks wants to merge 1 commit into
Conversation
…ilter when the scan uses the joined heap
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.
Fixes the ROWS_SCANNED server-side scan metric double-counting rows that pass the filter when the scan uses the joined heap, i.e.
Scan#setLoadColumnFamiliesOnDemand(true)with a filter marking some families as non-essential (Filter#isFamilyEssential).RegionScannerImpl#populateResultincrements the metric whenever the given heap finishes the current row, andpopulateFromJoinedHeapgoes through the same method for the non-essential families, so a row passing the filter was counted twice (once for the store heap, once for the joined heap). The row-scanned event is now recorded only when populating from the store heap.The new test in
TestServerSideScanMetricsFromClientSidereproduces the issue with stock filters (SingleColumnValueFilterwithsetFilterIfMissing(true)on a two-family table): before the fix ROWS_SCANNED reported 15 for a scan over 10 rows with 5 matching, after the fix it reports 10.Details: https://issues.apache.org/jira/browse/HBASE-30351