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

yiguolei pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.0 by this push:
     new 64bc318e589 branch-4.0: [chore](test) add fuzzy blockable pipeline 
task #56734 (#56777)
64bc318e589 is described below

commit 64bc318e5895894a797ee992991a7a1a93c180f3
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sun Oct 12 13:09:40 2025 +0800

    branch-4.0: [chore](test) add fuzzy blockable pipeline task #56734 (#56777)
    
    Cherry-picked from #56734
    
    Co-authored-by: Jerry Hu <[email protected]>
---
 be/src/pipeline/pipeline_task.cpp                                | 7 +++++++
 be/src/runtime/runtime_state.h                                   | 5 +++++
 .../src/main/java/org/apache/doris/qe/SessionVariable.java       | 9 ++++++++-
 gensrc/thrift/PaloInternalService.thrift                         | 2 ++
 .../performance/clickbench/conf/opt_session_variables.sql        | 1 +
 5 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/be/src/pipeline/pipeline_task.cpp 
b/be/src/pipeline/pipeline_task.cpp
index 444d48e914a..e41af301a73 100644
--- a/be/src/pipeline/pipeline_task.cpp
+++ b/be/src/pipeline/pipeline_task.cpp
@@ -302,6 +302,13 @@ bool PipelineTask::is_blockable() const {
     // 1. Execution dependency is ready (which is controlled by FE 2-phase 
commit)
     // 2. Runtime filter dependencies are ready
     // 3. All tablets are loaded into local storage
+
+    if (_state->enable_fuzzy_blockable_task()) {
+        if ((_schedule_time + _task_idx) % 2 == 0) {
+            return true;
+        }
+    }
+
     return _need_to_revoke_memory ||
            std::ranges::any_of(_operators,
                                [&](OperatorPtr op) -> bool { return 
op->is_blockable(_state); }) ||
diff --git a/be/src/runtime/runtime_state.h b/be/src/runtime/runtime_state.h
index 7c27892cfba..c2183c6dd59 100644
--- a/be/src/runtime/runtime_state.h
+++ b/be/src/runtime/runtime_state.h
@@ -391,6 +391,11 @@ public:
         return _query_options.return_object_data_as_binary;
     }
 
+    bool enable_fuzzy_blockable_task() const {
+        return _query_options.__isset.enable_fuzzy_blockable_task &&
+               _query_options.enable_fuzzy_blockable_task;
+    }
+
     segment_v2::CompressionTypePB fragement_transmission_compression_type() 
const {
         if (_query_options.__isset.fragment_transmission_compression_codec) {
             if (_query_options.fragment_transmission_compression_codec == 
"lz4") {
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java 
b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
index f8e19f06be0..ab9a31a6e80 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
@@ -613,6 +613,8 @@ public class SessionVariable implements Serializable, 
Writable {
     public static final String LOW_MEMORY_MODE_BUFFER_LIMIT = 
"low_memory_mode_buffer_limit";
     public static final String DUMP_HEAP_PROFILE_WHEN_MEM_LIMIT_EXCEEDED = 
"dump_heap_profile_when_mem_limit_exceeded";
 
+    public static final String ENABLE_FUZZY_BLOCKABLE_TASK = 
"enable_fuzzy_blockable_task";
+
     public static final String GENERATE_STATS_FACTOR = "generate_stats_factor";
 
     public static final String HUGE_TABLE_AUTO_ANALYZE_INTERVAL_IN_MILLIS
@@ -2788,6 +2790,10 @@ public class SessionVariable implements Serializable, 
Writable {
             needForward = true)
     public boolean dumpHeapProfileWhenMemLimitExceeded = false;
 
+    @VariableMgr.VarAttr(
+            name = ENABLE_FUZZY_BLOCKABLE_TASK, fuzzy = true)
+    public boolean enableFuzzyBlockableTask = false;
+
     @VariableMgr.VarAttr(name = USE_MAX_LENGTH_OF_VARCHAR_IN_CTAS, needForward 
= true, description = {
             "在CTAS中,如果 CHAR / VARCHAR 列不来自于源表,是否是将这一列的长度设置为 MAX,即65533。默认为 
true。",
             "In CTAS (Create Table As Select), if CHAR/VARCHAR columns do not 
originate from the source table,"
@@ -3108,7 +3114,7 @@ public class SessionVariable implements Serializable, 
Writable {
                 this.batchSize = 1024;
                 this.enableFoldConstantByBe = false;
             }
-
+            this.enableFuzzyBlockableTask = random.nextBoolean();
         }
         this.runtimeFilterWaitInfinitely = random.nextBoolean();
 
@@ -4586,6 +4592,7 @@ public class SessionVariable implements Serializable, 
Writable {
         tResult.setRuntimeBloomFilterMinSize(runtimeBloomFilterMinSize);
         tResult.setRuntimeBloomFilterMaxSize(runtimeBloomFilterMaxSize);
         tResult.setRuntimeFilterWaitInfinitely(runtimeFilterWaitInfinitely);
+        tResult.setEnableFuzzyBlockableTask(enableFuzzyBlockableTask);
 
         if (cpuResourceLimit > 0) {
             TResourceLimit resourceLimit = new TResourceLimit();
diff --git a/gensrc/thrift/PaloInternalService.thrift 
b/gensrc/thrift/PaloInternalService.thrift
index 71179e17c48..658ee87d3e4 100644
--- a/gensrc/thrift/PaloInternalService.thrift
+++ b/gensrc/thrift/PaloInternalService.thrift
@@ -407,6 +407,8 @@ struct TQueryOptions {
   172: optional bool enable_prefer_cached_rowset
   173: optional i64 query_freshness_tolerance_ms
 
+  175: optional bool enable_fuzzy_blockable_task = false;
+
   // For cloud, to control if the content would be written into file cache
   // In write path, to control if the content would be written into file cache.
   // In read path, read from file cache or remote storage when execute query.
diff --git 
a/regression-test/pipeline/performance/clickbench/conf/opt_session_variables.sql
 
b/regression-test/pipeline/performance/clickbench/conf/opt_session_variables.sql
index 742d613c14f..33cb502267e 100644
--- 
a/regression-test/pipeline/performance/clickbench/conf/opt_session_variables.sql
+++ 
b/regression-test/pipeline/performance/clickbench/conf/opt_session_variables.sql
@@ -5,3 +5,4 @@ set global enable_single_distinct_column_opt=true;
 set global enable_function_pushdown=true;
 set global forbid_unknown_col_stats=false;
 set global runtime_filter_mode=GLOBAL;
+set global enable_sql_cache=false;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to