zhiqiang-hhhh commented on code in PR #32010: URL: https://github.com/apache/doris/pull/32010#discussion_r1525711493
########## fe/fe-core/src/main/java/org/apache/doris/qe/QeProcessorImpl.java: ########## @@ -229,7 +216,7 @@ public TReportExecStatusResult reportExecStatus(TReportExecStatusParams params, try { info.getCoord().updateFragmentExecStatus(params); if (params.isSetProfile()) { - writeProfileExecutor.submit(new WriteProfileTask(params, info)); + //info.profile.updateExecution(params, beAddr); Review Comment: empty branch? ########## fe/fe-core/src/main/java/org/apache/doris/common/profile/ExecutionProfile.java: ########## @@ -59,35 +58,36 @@ public class ExecutionProfile { private static final Logger LOG = LogManager.getLogger(ExecutionProfile.class); + private final TUniqueId queryId; + private boolean isFinished = false; + private long startTime = 0l; // The root profile of this execution task - private RuntimeProfile executionProfile; + private RuntimeProfile root; // Profiles for each fragment. And the InstanceProfile is the child of fragment profile. // Which will be added to fragment profile when calling Coordinator::sendFragment() private List<RuntimeProfile> fragmentProfiles; // Profile for load channels. Only for load job. private RuntimeProfile loadChannelProfile; - // A countdown latch to mark the completion of each instance. - // use for old pipeline - // instance id -> dummy value - private MarkedCountDownLatch<TUniqueId, Long> profileDoneSignal; - - // A countdown latch to mark the completion of each fragment. use for pipelineX - // fragmentId -> dummy value - private MarkedCountDownLatch<Integer, Long> profileFragmentDoneSignal; - - // fragmentId -> The number of BE without 'done. - private Map<Integer, Integer> befragmentDone; - - // lock befragmentDone - private ReadWriteLock lock; + private boolean isPipelineXProfile = false; // use to merge profile from multi be private List<Map<TNetworkAddress, List<RuntimeProfile>>> multiBeProfile = null; - - public ExecutionProfile(TUniqueId queryId, int fragmentNum) { - executionProfile = new RuntimeProfile("Execution Profile " + DebugUtil.printId(queryId)); + // Profile using fragment id like 0,1,2,3,4. But fragment id in plan maybe not the same. + // Should use a mapping to map from plan's id to profile's id. + private Map<PlanFragmentId, Integer> fragmentIDIdx; Review Comment: Can we change the type of fragmentProfiles to `map<PlanFragmentId, RuntimeProfile>`? So that we can get RuntimeProfile by PlanFragmentId directly, and we do not need to convert them in many methods. The display fragment id will be generated only when we serialize them. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org