[ https://issues.apache.org/jira/browse/HBASE-16296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15400164#comment-15400164 ]
Ted Yu commented on HBASE-16296: -------------------------------- I wonder if the following change would help : {code} diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java index 89e723e..fa3836f 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java @@ -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); + 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 {code} > Reverse scan performance degrades when scanner cache size matches page filter > size > ---------------------------------------------------------------------------------- > > Key: HBASE-16296 > URL: https://issues.apache.org/jira/browse/HBASE-16296 > Project: HBase > Issue Type: Bug > Reporter: James Taylor > Attachments: 16296-MAYBE.txt, generatedata-snippet.java, > repro-snippet.java > > > When a reverse scan is done, the server seems to not know it's done when the > scanner cache size matches the number of rows in a PageFilter. See > PHOENIX-3121 for how this manifests itself. We have a standalone, pure HBase > API reproducer too that I'll attach (courtesy of [~churromorales] and > [~mujtabachohan]). -- This message was sent by Atlassian JIRA (v6.3.4#6332)