zhiqiang-hhhh commented on code in PR #33690:
URL: https://github.com/apache/doris/pull/33690#discussion_r1686257224


##########
fe/fe-core/src/main/java/org/apache/doris/qe/QeProcessorImpl.java:
##########
@@ -167,18 +167,9 @@ public void unregisterQuery(TUniqueId queryId) {
             if (LOG.isDebugEnabled()) {
                 LOG.debug("Deregister query id {}", 
DebugUtil.printId(queryId));
             }
-            ExecutionProfile executionProfile = 
ProfileManager.getInstance().getExecutionProfile(queryId);
-            if (executionProfile != null) {
-                
executionProfile.setQueryFinishTime(System.currentTimeMillis());
-                if (queryInfo.connectContext != null) {
-                    long autoProfileThresholdMs = queryInfo.connectContext
-                            .getSessionVariable().getAutoProfileThresholdMs();
-                    if (autoProfileThresholdMs > 0 && 
System.currentTimeMillis() - queryInfo.getStartExecTime()
-                            < autoProfileThresholdMs) {
-                        
ProfileManager.getInstance().removeProfile(executionProfile.getSummaryProfile().getProfileId());
-                    }
-                }
-            }
+
+            ProfileManager.getInstance().markQueryFinished(queryId);

Review Comment:
   Fixed, markQueryFinished 现在会把 ExecutionProfile 的 queryFinishedTime 
设置成当前时间,跟之前一样。不过希望这些操作都是在 ProfileManager 里完成,方便检索代码,所以没用之前的方式。



-- 
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

Reply via email to