From 4d6197f47986f7acb308b2a20e852d5732908122 Mon Sep 17 00:00:00 2001 From: zhiqiang Date: Fri, 31 Oct 2025 11:10:13 +0800 Subject: [PATCH] [fix](profile) Disable profile collection by default (#57314) ### What problem does this PR solve? 1. Memory consumption of profile is still a big problem of FE. So disable it by default. 2. For load task, we need to update counter even if profile is not enabled, since final http return msg needs it. --- be/src/vec/exec/scan/scanner.cpp | 2 +- .../src/main/java/org/apache/doris/qe/SessionVariable.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/be/src/vec/exec/scan/scanner.cpp b/be/src/vec/exec/scan/scanner.cpp index dc7133927b1f02..77b9a54cb7a32e 100644 --- a/be/src/vec/exec/scan/scanner.cpp +++ b/be/src/vec/exec/scan/scanner.cpp @@ -244,7 +244,7 @@ Status Scanner::close(RuntimeState* state) { void Scanner::_collect_profile_before_close() { COUNTER_UPDATE(_local_state->_scan_cpu_timer, _scan_cpu_timer); COUNTER_UPDATE(_local_state->_rows_read_counter, _num_rows_read); - if (!_state->enable_profile() && !_is_load) return; + // Update stats for load _state->update_num_rows_load_filtered(_counter.num_rows_filtered); _state->update_num_rows_load_unselected(_counter.num_rows_unselected); 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 102c44df43ce6a..efa9360eb99699 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 @@ -1018,7 +1018,7 @@ public static double getHotValueThreshold() { // if true, need report to coordinator when plan fragment execute successfully. @VariableMgr.VarAttr(name = ENABLE_PROFILE, needForward = true) - public boolean enableProfile = true; + public boolean enableProfile = false; @VariableMgr.VarAttr(name = RPC_VERBOSE_PROFILE_MAX_INSTANCE_COUNT, needForward = true) public int rpcVerboseProfileMaxInstanceCount = 5;