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

[hbase] branch branch-2.2 updated: HBASE-24742 Improve performance of SKIP vs SEEK logic.

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

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


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

commit 73043507e9650b90d60ffb251b47b0c7a41a4a6d
Author: Lars <la...@apache.org>
AuthorDate: Thu Jul 16 13:10:06 2020 -0700

    HBASE-24742 Improve performance of SKIP vs SEEK logic.
    
    (cherry picked from commit 86f00e474913730e096d7f2906bb3c86f55cef17)
---
 .../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 3ad3be8..2935949 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
@@ -183,7 +183,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 = numColumns > 1 || (!get && numColumns == 1);
+    this.useRowColBloom = numColumns > 1 || (!get && numColumns == 1)
+        && (store == null || store.getColumnFamilyDescriptor().getBloomFilterType() == BloomType.ROWCOL);
     this.maxRowSize = scanInfo.getTableMaxRowSize();
     if (get) {
       this.readType = Scan.ReadType.PREAD;
@@ -915,7 +916,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;