You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2022/06/07 08:57:23 UTC

[incubator-doris] 01/06: [hotfix] fix bloomfilter disable threshold

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

morningman pushed a commit to branch dev-1.0.1
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git

commit 5d3f07feb0be5d1b136242242b9da3485e799233
Author: morningman <mo...@163.com>
AuthorDate: Tue Jun 7 09:49:50 2022 +0800

    [hotfix] fix bloomfilter disable threshold
    
    This issue is introduced from #9792, that config may cause some query slow
---
 be/src/common/config.h               |  4 ----
 be/src/olap/bloom_filter_predicate.h | 16 ----------------
 2 files changed, 20 deletions(-)

diff --git a/be/src/common/config.h b/be/src/common/config.h
index 90faf93006..48582beabe 100644
--- a/be/src/common/config.h
+++ b/be/src/common/config.h
@@ -718,10 +718,6 @@ CONF_Int32(object_pool_buffer_size, "100");
 // ParquetReaderWrap prefetch buffer size
 CONF_Int32(parquet_reader_max_buffer_size, "50");
 
-// When the rows number reached this limit, will check the filter rate the of bloomfilter
-// if it is lower than a specific threshold, the predicate will be disabled.
-CONF_mInt32(bloom_filter_predicate_check_row_num, "1000");
-
 } // namespace config
 
 } // namespace doris
diff --git a/be/src/olap/bloom_filter_predicate.h b/be/src/olap/bloom_filter_predicate.h
index a7671f2724..f7ba4653f6 100644
--- a/be/src/olap/bloom_filter_predicate.h
+++ b/be/src/olap/bloom_filter_predicate.h
@@ -71,9 +71,6 @@ public:
 private:
     std::shared_ptr<IBloomFilterFuncBase> _filter;
     SpecificFilter* _specific_filter; // owned by _filter
-    mutable uint64_t _evaluated_rows = 1;
-    mutable uint64_t _passed_rows = 0;
-    mutable bool _enable_pred = true;
 };
 
 // bloom filter column predicate do not support in segment v1
@@ -116,9 +113,6 @@ void BloomFilterColumnPredicate<T>::evaluate(vectorized::IColumn& column, uint16
                                                 uint16_t* size) const {
     uint16_t new_size = 0;
     using FT = typename PredicatePrimitiveTypeTraits<T>::PredicateFieldType;
-    if (!_enable_pred) {
-        return;
-    }
     if (column.is_nullable()) {
         auto* nullable_col = vectorized::check_and_get_column<vectorized::ColumnNullable>(column);
         auto& null_map_data = nullable_col->get_null_map_column().get_data();
@@ -163,16 +157,6 @@ void BloomFilterColumnPredicate<T>::evaluate(vectorized::IColumn& column, uint16
             new_size += _specific_filter->find_olap_engine(cell_value);
         }
     }
-    // If the pass rate is very high, for example > 50%, then the bloomfilter is useless.
-    // Some bloomfilter is useless, for example ssb 4.3, it consumes a lot of cpu but it is
-    // useless.
-    _evaluated_rows += *size;
-    _passed_rows += new_size;
-    if (_evaluated_rows > config::bloom_filter_predicate_check_row_num) {
-        if (_passed_rows / (_evaluated_rows * 1.0) > 0.5) {
-            _enable_pred = false;
-        }
-    }
     *size = new_size;
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org