diff --git a/fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/InsertTask.java b/fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/InsertTask.java index 23a367d5d6e1a1..622df04d2ada2d 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/InsertTask.java +++ b/fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/InsertTask.java @@ -209,10 +209,12 @@ public void run() throws JobException { @Override public void onFail() throws JobException { - if (isCanceled.get()) { + if (null != isCanceled && isCanceled.get()) { return; } - isFinished.set(true); + if (null != isFinished) { + isFinished.set(true); + } super.onFail(); }