morrySnow commented on code in PR #48830: URL: https://github.com/apache/doris/pull/48830#discussion_r2018325446
########## fe/fe-core/src/main/java/org/apache/doris/job/extensions/mtmv/MTMVTask.java: ########## @@ -364,6 +364,14 @@ public synchronized boolean cancel(boolean needWaitCancelComplete) throws JobExc @Override protected void executeCancelLogic(boolean needWaitCancelComplete) { + try { + if (mtmv == null) { Review Comment: add comment to explain when mtmv could be null ########## fe/fe-core/src/main/java/org/apache/doris/job/task/AbstractTask.java: ########## @@ -184,7 +184,9 @@ public void runTask() throws JobException { onFail(); log.warn("execute task error, job id is {}, task id is {}", jobId, taskId, e); } finally { - closeOrReleaseResources(); + if (!TaskStatus.CANCELED.equals(status)) { + closeOrReleaseResources(); Review Comment: why only release resource when status is not canceled? add some comment to explain it -- 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