This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 0cfef27b8d5 [fix](mtmv) Avoiding the occurrence of null pointers in
logs due to the deletion of MTMV (#31722)
0cfef27b8d5 is described below
commit 0cfef27b8d5af4bcea0afb8fc0ea44c1d9b12c40
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]