You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2024/01/18 02:05:14 UTC
(doris) 22/22: [improvement](fe) skip attach profile during send fragment (#30085)
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
commit e7c6c12a65a62b65a30428f54c081dcb42c6f509
Author: yiguolei <67...@qq.com>
AuthorDate: Thu Jan 18 10:00:53 2024 +0800
[improvement](fe) skip attach profile during send fragment (#30085)
Sometime attach profile may cost a lot of time in large machine with many instances.
---------
Co-authored-by: yiguolei <yi...@gmail.com>
---
.../src/main/java/org/apache/doris/qe/Coordinator.java | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
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 2f58e560740..586a27ee103 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
@@ -233,7 +233,6 @@ public class Coordinator implements CoordInterface {
// Input parameter
private long jobId = -1; // job which this task belongs to
private TUniqueId queryId;
- private final boolean needReport;
// parallel execute
private final TUniqueId nextInstanceId;
@@ -324,7 +323,6 @@ public class Coordinator implements CoordInterface {
} else {
this.queryGlobals.setTimeZone(context.getSessionVariable().getTimeZone());
}
- this.needReport = context.getSessionVariable().enableProfile();
this.nextInstanceId = new TUniqueId();
nextInstanceId.setHi(queryId.hi);
nextInstanceId.setLo(queryId.lo + 1);
@@ -348,7 +346,6 @@ public class Coordinator implements CoordInterface {
this.queryGlobals.setTimeZone(timezone);
this.queryGlobals.setLoadZeroTolerance(loadZeroTolerance);
this.queryOptions.setBeExecVersion(Config.be_exec_version);
- this.needReport = true;
this.nextInstanceId = new TUniqueId();
nextInstanceId.setHi(queryId.hi);
nextInstanceId.setLo(queryId.lo + 1);
@@ -845,8 +842,9 @@ public class Coordinator implements CoordInterface {
}
waitRpc(futures, this.timeoutDeadline - System.currentTimeMillis(), "send execution start");
}
-
- attachInstanceProfileToFragmentProfile();
+ if (context != null && context.getSessionVariable().enableProfile()) {
+ attachInstanceProfileToFragmentProfile();
+ }
} finally {
unlock();
}
@@ -988,8 +986,9 @@ public class Coordinator implements CoordInterface {
}
waitPipelineRpc(futures, this.timeoutDeadline - System.currentTimeMillis(), "send execution start");
}
-
- attachInstanceProfileToFragmentProfile();
+ if (context != null && context.getSessionVariable().enableProfile()) {
+ attachInstanceProfileToFragmentProfile();
+ }
} finally {
unlock();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org