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

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


The following commit(s) were added to refs/heads/master by this push:
     new a1713f0e641 [chore](profile) Remove enable_verbose_profile (#47981)
a1713f0e641 is described below

commit a1713f0e64106b24ba919fdccf5891c019a975df
Author: zhiqiang <hezhiqi...@selectdb.com>
AuthorDate: Thu Feb 27 11:13:52 2025 +0800

    [chore](profile) Remove enable_verbose_profile (#47981)
---
 be/src/pipeline/exec/exchange_sink_buffer.cpp                 |  4 +++-
 be/src/runtime/runtime_state.h                                |  5 -----
 .../src/main/java/org/apache/doris/qe/SessionVariable.java    | 11 +++++------
 gensrc/thrift/PaloInternalService.thrift                      |  2 +-
 4 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/be/src/pipeline/exec/exchange_sink_buffer.cpp 
b/be/src/pipeline/exec/exchange_sink_buffer.cpp
index fbc69ae9d60..90d54a35aa0 100644
--- a/be/src/pipeline/exec/exchange_sink_buffer.cpp
+++ b/be/src/pipeline/exec/exchange_sink_buffer.cpp
@@ -558,7 +558,9 @@ void ExchangeSinkBuffer::update_profile(RuntimeProfile* 
profile) {
     _avg_rpc_timer->set(sum_time / std::max(static_cast<int64_t>(1), 
_rpc_count.load()));
 
     auto max_count = _state->rpc_verbose_profile_max_instance_count();
-    if (_state->enable_verbose_profile() && max_count > 0) {
+    // This counter will lead to performance degradation.
+    // So only collect this information when the profile level is greater than 
3.
+    if (_state->profile_level() > 3 && max_count > 0) {
         std::vector<RpcInstanceStatistics> tmp_rpc_stats_vec;
         for (const auto& stats : _instance_to_rpc_stats_vec) {
             tmp_rpc_stats_vec.emplace_back(*stats);
diff --git a/be/src/runtime/runtime_state.h b/be/src/runtime/runtime_state.h
index d10d12b2be4..aa486d3b8b6 100644
--- a/be/src/runtime/runtime_state.h
+++ b/be/src/runtime/runtime_state.h
@@ -466,11 +466,6 @@ public:
         return _query_options.__isset.enable_profile && 
_query_options.enable_profile;
     }
 
-    bool enable_verbose_profile() const {
-        return enable_profile() && 
_query_options.__isset.enable_verbose_profile &&
-               _query_options.enable_verbose_profile;
-    }
-
     int rpc_verbose_profile_max_instance_count() const {
         return _query_options.__isset.rpc_verbose_profile_max_instance_count
                        ? _query_options.rpc_verbose_profile_max_instance_count
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 e69f3b616e8..4f8fd7b6f62 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
@@ -99,7 +99,6 @@ public class SessionVariable implements Serializable, 
Writable {
     public static final String MAX_EXECUTION_TIME = "max_execution_time";
     public static final String INSERT_TIMEOUT = "insert_timeout";
     public static final String ENABLE_PROFILE = "enable_profile";
-    public static final String ENABLE_VERBOSE_PROFILE = 
"enable_verbose_profile";
     public static final String RPC_VERBOSE_PROFILE_MAX_INSTANCE_COUNT = 
"rpc_verbose_profile_max_instance_count";
     public static final String AUTO_PROFILE_THRESHOLD_MS = 
"auto_profile_threshold_ms";
     public static final String SQL_MODE = "sql_mode";
@@ -825,9 +824,6 @@ public class SessionVariable implements Serializable, 
Writable {
     @VariableMgr.VarAttr(name = ENABLE_PROFILE, needForward = true)
     public boolean enableProfile = true;
 
-    @VariableMgr.VarAttr(name = ENABLE_VERBOSE_PROFILE, needForward = true)
-    public boolean enableVerboseProfile = false;
-
     @VariableMgr.VarAttr(name = RPC_VERBOSE_PROFILE_MAX_INSTANCE_COUNT, 
needForward = true)
     public int rpcVerboseProfileMaxInstanceCount = 5;
 
@@ -1039,7 +1035,11 @@ public class SessionVariable implements Serializable, 
Writable {
                     "Use consistent hashing to split the appearance for 
external scan"})
     public boolean useConsistentHashForExternalScan = false;
 
-    @VariableMgr.VarAttr(name = PROFILE_LEVEL, fuzzy = true)
+    @VariableMgr.VarAttr(name = PROFILE_LEVEL, fuzzy = true,
+            description = { "查询profile的级别,1表示只收集 MergedProfile 级别的 Counter,2 
表示打印详细信息,"
+                            + "3 表示打开一些可能导致性能回退的 Counter", "The level of query 
profile, "
+                            + "1 means only collect Counter of MergedProfile, 
2 means print detailed information,"
+                            + " 3 means open some Counters that may cause 
performance degradation"})
     public int profileLevel = 1;
 
     @VariableMgr.VarAttr(name = MAX_INSTANCE_NUM)
@@ -3937,7 +3937,6 @@ public class SessionVariable implements Serializable, 
Writable {
 
         tResult.setQueryTimeout(queryTimeoutS);
         tResult.setEnableProfile(enableProfile);
-        tResult.setEnableVerboseProfile(enableVerboseProfile);
         
tResult.setRpcVerboseProfileMaxInstanceCount(rpcVerboseProfileMaxInstanceCount);
         if (enableProfile) {
             // If enable profile == true, then also set report success to true
diff --git a/gensrc/thrift/PaloInternalService.thrift 
b/gensrc/thrift/PaloInternalService.thrift
index 1d804d9fe62..b8cbc46fe77 100644
--- a/gensrc/thrift/PaloInternalService.thrift
+++ b/gensrc/thrift/PaloInternalService.thrift
@@ -339,7 +339,7 @@ struct TQueryOptions {
   126: optional i32 runtime_bloom_filter_max_size = 16777216;
   127: optional i32 in_list_value_count_threshold = 10;
   // We need this two fields to make sure thrift id on master is compatible 
with other branch.
-  128: optional bool enable_verbose_profile = false;
+  128: optional bool enable_verbose_profile = false;  // deprecated
   129: optional i32 rpc_verbose_profile_max_instance_count = 0;
 
   130: optional bool enable_adaptive_pipeline_task_serial_read_on_limit = true;


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

Reply via email to