You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by zi...@apache.org on 2024/11/05 07:19:48 UTC

(dolphinscheduler) branch dev updated: [Fix-16764] Tasks dispatched failed weren't delayed properly as documented in GlobalTaskDispatchWaitingQueueLooper

This is an automated email from the ASF dual-hosted git repository.

zihaoxiang pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new d19655fd1e [Fix-16764] Tasks dispatched failed weren't delayed properly as documented in GlobalTaskDispatchWaitingQueueLooper
d19655fd1e is described below

commit d19655fd1e9662482f0f0e08fabdc2ff87fbf7d1
Author: slimtom95 <bp...@gmail.com>
AuthorDate: Tue Nov 5 15:19:43 2024 +0800

    [Fix-16764] Tasks dispatched failed weren't delayed properly as documented in GlobalTaskDispatchWaitingQueueLooper
---
 .../server/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 24bbe962e9..e2657b697d 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 @@ public class GlobalTaskDispatchWaitingQueueLooper extends BaseDaemonThread imple
             // 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);