From be005ee1cb6ea4a5e62040bfec84a8db2ea97ab1 Mon Sep 17 00:00:00 2001 From: chenyuzhi459 <553673833@qq.com> Date: Sun, 26 Nov 2023 16:37:33 +0800 Subject: [PATCH] [AMORO-2318]: Fix cost time for TaskRunTime (#2354) fix: fix cost time for TaskRunTime Co-authored-by: chenyuzhi --- .../java/com/netease/arctic/server/optimizing/TaskRuntime.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }