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 cc8112273ebb8090fe7b4596f68acfd6111a2c9b Author: zhangdong <[email protected]> AuthorDate: Tue Mar 5 18:42:12 2024 +0800 [fix](mtmv) Avoiding the occurrence of null pointers in logs due to the deletion of MTMV (#31722) --- .../java/org/apache/doris/job/extensions/mtmv/MTMVTask.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/job/extensions/mtmv/MTMVTask.java b/fe/fe-core/src/main/java/org/apache/doris/job/extensions/mtmv/MTMVTask.java index fd0711b8bc4..d7722e090d0 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/job/extensions/mtmv/MTMVTask.java +++ b/fe/fe-core/src/main/java/org/apache/doris/job/extensions/mtmv/MTMVTask.java @@ -29,6 +29,7 @@ import org.apache.doris.common.UserException; import org.apache.doris.common.util.DebugUtil; import org.apache.doris.common.util.TimeUtils; import org.apache.doris.datasource.hive.HMSExternalTable; +import org.apache.doris.job.common.TaskStatus; import org.apache.doris.job.exception.JobException; import org.apache.doris.job.task.AbstractTask; import org.apache.doris.mtmv.BaseTableInfo; @@ -199,8 +200,13 @@ public class MTMVTask extends AbstractTask { partitionSnapshots.putAll(execPartitionSnapshots); } } catch (Throwable e) { - LOG.warn("run task failed: ", e); - throw new JobException(e); + if (getStatus() == TaskStatus.RUNNING) { + LOG.warn("run task failed: ", e); + throw new JobException(e); + } else { + // if status is not `RUNNING`,maybe the task was canceled, therefore, it is a normal situation + LOG.info("task [{}] interruption running, because status is [{}]", getTaskId(), getStatus()); + } } } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
