From d19655fd1e9662482f0f0e08fabdc2ff87fbf7d1 Mon Sep 17 00:00:00 2001 From: slimtom95 Date: Tue, 5 Nov 2024 15:19:43 +0800 Subject: [PATCH] [Fix-16764] Tasks dispatched failed weren't delayed properly as documented in GlobalTaskDispatchWaitingQueueLooper --- .../master/runner/GlobalTaskDispatchWaitingQueueLooper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/GlobalTaskDispatchWaitingQueueLooper.java b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/GlobalTaskDispatchWaitingQueueLooper.java index 24bbe962e95c..e2657b697d2d 100644 --- a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/GlobalTaskDispatchWaitingQueueLooper.java +++ b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/GlobalTaskDispatchWaitingQueueLooper.java @@ -80,7 +80,7 @@ void doDispatch() { // If dispatch failed, will put the task back to the queue // The task will be dispatched after waiting time. // the waiting time will increase multiple of times, but will not exceed 60 seconds - long waitingTimeMills = Math.max( + long waitingTimeMills = Math.min( taskExecutionRunnable.getTaskExecutionContext().increaseDispatchFailTimes() * 1_000L, 60_000L); globalTaskDispatchWaitingQueue.dispatchTaskExecuteRunnableWithDelay(taskExecutionRunnable, waitingTimeMills);