You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by la...@apache.org on 2020/07/16 17:16:15 UTC

[hbase] branch branch-1 updated: HBASE-24742 Improve performance of SKIP vs SEEK logic. (#2075)

This is an automated email from the ASF dual-hosted git repository.

larsh pushed a commit to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-1 by this push:
     new 71aec0f  HBASE-24742 Improve performance of SKIP vs SEEK logic. (#2075)
71aec0f is described below

commit 71aec0fb4387dac54a6eb9e8f60c7a75c83674b0
Author: lhofhansl <lh...@yahoo.com>
AuthorDate: Thu Jul 16 10:16:03 2020 -0700

    HBASE-24742 Improve performance of SKIP vs SEEK logic. (#2075)
---
 .../main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
index c615925..4cce988 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
@@ -173,7 +173,8 @@ public class StoreScanner extends NonReversedNonLazyKeyValueScanner
      // the seek operation. However, we also look the row-column Bloom filter
      // for multi-row (non-"get") scans because this is not done in
      // StoreFile.passesBloomFilter(Scan, SortedSet<byte[]>).
-     this.useRowColBloom = numCol > 1 || (!get && numCol == 1);
+     this.useRowColBloom = (numCol > 1 || (!get && numCol == 1))
+         && (store == null || store.getFamily().getBloomFilterType() == BloomType.ROWCOL);
 
      this.maxRowSize = scanInfo.getTableMaxRowSize();
      this.scanUsePread = scan.isSmall()? true: scanInfo.isUsePread();
@@ -844,7 +845,7 @@ public class StoreScanner extends NonReversedNonLazyKeyValueScanner
     // We need this check because it may happen that the new scanner that we get
     // during heap.next() is requiring reseek due of fake KV previously generated for
     // ROWCOL bloom filter optimization. See HBASE-19863 for more details
-    if (nextCell != null && matcher.compareKeyForNextColumn(nextCell, cell) < 0) {
+    if (useRowColBloom && nextCell != null && matcher.compareKeyForNextColumn(nextCell, cell) < 0) {
       return false;
     }
     return true;