Skip to content

Commit

Permalink
[fix](profile) Fix content missing of brokerload profile (#34839)
Browse files Browse the repository at this point in the history
* Fix compile

* fix style

* [fix](profile) Fix content missing of brokerload profile (#33969)
  • Loading branch information
zhiqiang-hhhh authored May 14, 2024
1 parent bac5172 commit ff22128
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,12 @@ protected void executeTask() throws Exception {
}

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);
Expand Down
5 changes: 3 additions & 2 deletions fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java
Original file line number Diff line number Diff line change
Expand Up @@ -357,19 +357,20 @@ public Coordinator(ConnectContext context, Analyzer analyzer, Planner planner) {
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;
this.descTable = descTable.toThrift();
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);
Expand Down

0 comments on commit ff22128

Please sign in to comment.