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

morningman 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 d19cfa7fb25 [fix](fe) Fix bugs in SummaryProfile and StmtExecutor 
metric reporting (#61601)
d19cfa7fb25 is described below

commit d19cfa7fb25a451eeabd47994ce5a3c6f70ded7b
Author: Mingyu Chen (Rayner) <[email protected]>
AuthorDate: Mon Mar 23 20:02:47 2026 -0700

    [fix](fe) Fix bugs in SummaryProfile and StmtExecutor metric reporting 
(#61601)
    
    ### What problem does this PR solve?
    
    Issue Number: close #xxx
    
    Problem Summary:
    
    Fix three bugs found in SummaryProfile and StmtExecutor:
    
    1. **Wrong field assignment in `addNereidsPartitiionPruneTime()`**
    (SummaryProfile.java):
    The method was incorrectly accumulating partition prune time into
    `externalTvfInitTime`
       instead of `nereidsPartitiionPruneTime`. This caused:
    - `nereidsPartitiionPruneTime` to always be 0, so
    `HISTO_PLAN_PARTITION_PRUNE_DURATION`
         metric never collected correct data
    - `externalTvfInitTime` to be polluted with unrelated partition prune
    time data
    
    2. **Wrong guard variable for translate metric** (StmtExecutor.java):
       When reporting `HISTO_PLAN_TRANSLATE_DURATION`, the condition checked
    `nereidsOptimizeTimeMs >= 0` instead of `nereidsTranslateTimeMs >= 0`.
       This means the translate metric was gated by the optimize time value
       rather than the translate time value itself.
---
 .../src/main/java/org/apache/doris/common/profile/SummaryProfile.java   | 2 +-
 fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/common/profile/SummaryProfile.java 
b/fe/fe-core/src/main/java/org/apache/doris/common/profile/SummaryProfile.java
index 55ad21141de..1005f687bb5 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/common/profile/SummaryProfile.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/common/profile/SummaryProfile.java
@@ -1198,7 +1198,7 @@ public class SummaryProfile {
     }
 
     public void addNereidsPartitiionPruneTime(long ms) {
-        this.externalTvfInitTime += ms;
+        this.nereidsPartitiionPruneTime += ms;
     }
 
     public long getNereidsPartitiionPruneTimeMs() {
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java 
b/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java
index b980edbcdec..8dd8ebe8360 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java
@@ -848,7 +848,7 @@ public class StmtExecutor {
                     
MetricRepo.HISTO_PLAN_OPTIMIZE_DURATION.update(nereidsOptimizeTimeMs);
                 }
                 int nereidsTranslateTimeMs = 
summaryProfile.getNereidsTranslateTimeMs();
-                if (nereidsOptimizeTimeMs >= 0) {
+                if (nereidsTranslateTimeMs >= 0) {
                     
MetricRepo.HISTO_PLAN_TRANSLATE_DURATION.update(nereidsTranslateTimeMs);
                 }
                 long initScanNodeTimeMs = 
summaryProfile.getInitScanNodeTimeMs();


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

Reply via email to