slimtom95 opened a new pull request, #16763:
URL: https://github.com/apache/dolphinscheduler/pull/16763

   <!--Thanks very much for contributing to Apache DolphinScheduler, we are 
happy that you want to help us improve DolphinScheduler! -->
   
   ## Purpose of the pull request
   
   <!--(For example: This pull request adds checkstyle plugin).-->
   
   Here I quote the following piece of code in 
`GlobalTaskDispatchWaitingQueueLooper`.
   The java doc says the waiting time won't exceed 60 seconds, while using 
`Math.max` clearly does the opposite.
   
   ```
               // 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(
                       
taskExecutionRunnable.getTaskExecutionContext().increaseDispatchFailTimes() * 
1_000L, 60_000L);
               
globalTaskDispatchWaitingQueue.dispatchTaskExecuteRunnableWithDelay(taskExecutionRunnable,
                       waitingTimeMills);
               log.error("Dispatch Task: {} failed will retry after: {}/ms", 
taskInstance.getName(), waitingTimeMills, e);
   ```
   
   ## Brief change log
   
   Replace `Math.max` with `Math.min`
   
   ## Verify this pull request
   
   The change is trivial, I tested on local deployment, no unittest for this.
   
   ## Pull Request Notice
   [Pull Request 
Notice](https://github.com/apache/dolphinscheduler/blob/dev/docs/docs/en/contribute/join/pull-request.md)
   
   If your pull request contain incompatible change, you should also add it to 
`docs/docs/en/guide/upgrede/incompatible.md`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to