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

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


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new ff221280133 [fix](profile) Fix content missing of brokerload profile 
(#34839)
ff221280133 is described below

commit ff221280133d44a68738881b13120acbe1940e36
Author: zhiqiang <[email protected]>
AuthorDate: Tue May 14 18:56:58 2024 +0800

    [fix](profile) Fix content missing of brokerload profile (#34839)
    
    * Fix compile
    
    * fix style
    
    * [fix](profile) Fix content missing of brokerload profile (#33969)
---
 .../src/main/java/org/apache/doris/load/loadv2/LoadLoadingTask.java | 6 ++++--
 fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java       | 5 +++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/load/loadv2/LoadLoadingTask.java 
b/fe/fe-core/src/main/java/org/apache/doris/load/loadv2/LoadLoadingTask.java
index ef7a07cb9a4..2d1b312fb8d 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/load/loadv2/LoadLoadingTask.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/load/loadv2/LoadLoadingTask.java
@@ -139,10 +139,12 @@ public class LoadLoadingTask extends LoadTask {
     }
 
     private void executeOnce() throws Exception {
+        final boolean enabelProfile = this.jobProfile != null;
         // New one query id,
         Coordinator curCoordinator = new Coordinator(callback.getCallbackId(), 
loadId, planner.getDescTable(),
-                planner.getFragments(), planner.getScanNodes(), 
planner.getTimezone(), loadZeroTolerance);
-        if (this.jobProfile != null) {
+                planner.getFragments(), planner.getScanNodes(), 
planner.getTimezone(), loadZeroTolerance,
+                enabelProfile);
+        if (enabelProfile) {
             
this.jobProfile.addExecutionProfile(curCoordinator.getExecutionProfile());
         }
         curCoordinator.setQueryType(TQueryType.LOAD);
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java 
b/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java
index bd777c5be64..540c3598d0c 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java
@@ -357,12 +357,12 @@ public class Coordinator implements CoordInterface {
         nextInstanceId.setLo(queryId.lo + 1);
         this.assignedRuntimeFilters = planner.getRuntimeFilters();
         this.executionProfile = new ExecutionProfile(queryId, fragments);
-
     }
 
     // Used for broker load task/export task/update coordinator
+    // Constructor of Coordinator is too complicated.
     public Coordinator(Long jobId, TUniqueId queryId, DescriptorTable 
descTable, List<PlanFragment> fragments,
-            List<ScanNode> scanNodes, String timezone, boolean 
loadZeroTolerance) {
+            List<ScanNode> scanNodes, String timezone, boolean 
loadZeroTolerance, boolean enableProfile) {
         this.isBlockQuery = true;
         this.jobId = jobId;
         this.queryId = queryId;
@@ -370,6 +370,7 @@ public class Coordinator implements CoordInterface {
         this.fragments = fragments;
         this.scanNodes = scanNodes;
         this.queryOptions = new TQueryOptions();
+        this.queryOptions.setEnableProfile(enableProfile);
         
this.queryGlobals.setNowString(TimeUtils.DATETIME_FORMAT.format(LocalDateTime.now()));
         this.queryGlobals.setTimestampMs(System.currentTimeMillis());
         this.queryGlobals.setTimeZone(timezone);


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

Reply via email to