diff --git a/ams/server/src/main/java/com/netease/arctic/server/optimizing/TaskRuntime.java b/ams/server/src/main/java/com/netease/arctic/server/optimizing/TaskRuntime.java index 15834d42cf..85dfaf76fb 100644 --- a/ams/server/src/main/java/com/netease/arctic/server/optimizing/TaskRuntime.java +++ b/ams/server/src/main/java/com/netease/arctic/server/optimizing/TaskRuntime.java @@ -235,7 +235,7 @@ public String getFailReason() { } public long getCostTime() { - if (endTime != ArcticServiceConstants.INVALID_TIME) { + if (endTime == ArcticServiceConstants.INVALID_TIME) { long elapse = System.currentTimeMillis() - startTime; return Math.max(0, elapse) + costTime; }