HBASE-16296 Reverse scan performance degrades when using filter lists (Ted Yu)

This commit is contained in:
Andrew Purtell 2016-08-01 11:13:47 -07:00
parent aa0235f98c
commit 78361243c8
1 changed files with 4 additions and 0 deletions

View File

@ -5951,6 +5951,10 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
// Technically, if we hit limits before on this row, we don't need this call.
if (filterRowKey(current)) {
incrementCountOfRowsFilteredMetric(scannerContext);
// early check, see HBASE-16296
if (isFilterDoneInternal()) {
return scannerContext.setScannerState(NextState.NO_MORE_VALUES).hasMoreValues();
}
// Typically the count of rows scanned is incremented inside #populateResult. However,
// here we are filtering a row based purely on its row key, preventing us from calling
// #populateResult. Thus, perform the necessary increment here to rows scanned metric