[DSIP-55][Master] Separate the waiting dispatched task into different queue by worker group#17037
[DSIP-55][Master] Separate the waiting dispatched task into different queue by worker group#17037ruanwenjun merged 46 commits intoapache:devfrom
Conversation
|
Thanks for opening this pull request! Please check out our contributing guidelines. (https://github.com/apache/dolphinscheduler/blob/dev/docs/docs/en/contribute/join/pull-request.md) |
...src/main/java/org/apache/dolphinscheduler/server/master/runner/queue/PriorityDelayEntry.java
Fixed
Show fixed
Hide fixed
...er-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/WorkflowEngine.java
Outdated
Show resolved
Hide resolved
...in/java/org/apache/dolphinscheduler/server/master/runner/GlobalTaskDispatchWaitingQueue.java
Outdated
Show resolved
Hide resolved
...in/java/org/apache/dolphinscheduler/server/master/runner/GlobalTaskDispatchWaitingQueue.java
Outdated
Show resolved
Hide resolved
...a/org/apache/dolphinscheduler/server/master/runner/GlobalTaskDispatchWaitingQueueLooper.java
Outdated
Show resolved
Hide resolved
...a/org/apache/dolphinscheduler/server/master/runner/GlobalTaskDispatchWaitingQueueLooper.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkerGroupQueueLooper.java
Outdated
Show resolved
Hide resolved
...-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/queue/DelayEntry.java
Show resolved
Hide resolved
...src/main/java/org/apache/dolphinscheduler/server/master/runner/queue/PriorityDelayEntry.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/apache/dolphinscheduler/server/master/runner/queue/WorkerGroupQueueMap.java
Outdated
Show resolved
Hide resolved
...er/src/main/java/org/apache/dolphinscheduler/server/master/runner/queue/ComparableEntry.java
Outdated
Show resolved
Hide resolved
...er/src/main/java/org/apache/dolphinscheduler/server/master/runner/queue/ComparableEntry.java
Outdated
Show resolved
Hide resolved
...er/src/main/java/org/apache/dolphinscheduler/server/master/runner/queue/ComparableEntry.java
Outdated
Show resolved
Hide resolved
.../apache/dolphinscheduler/server/master/runner/WorkerGroupTaskDispatchWaitingQueueLooper.java
Outdated
Show resolved
Hide resolved
...in/java/org/apache/dolphinscheduler/server/master/runner/WorkerGroupTaskDispatchManager.java
Outdated
Show resolved
Hide resolved
...in/java/org/apache/dolphinscheduler/server/master/runner/WorkerGroupTaskDispatchManager.java
Outdated
Show resolved
Hide resolved
...in/java/org/apache/dolphinscheduler/server/master/runner/GlobalTaskDispatchWaitingQueue.java
Outdated
Show resolved
Hide resolved
...er-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/DispatchWorker.java
Outdated
Show resolved
Hide resolved
...e/dolphinscheduler/server/master/cluster/ThreadCreatingAndDestroyingWorkerGroupListener.java
Outdated
Show resolved
Hide resolved
...r-master/src/main/java/org/apache/dolphinscheduler/server/master/cluster/ClusterManager.java
Outdated
Show resolved
Hide resolved
...in/java/org/apache/dolphinscheduler/server/master/runner/GlobalTaskDispatchWaitingQueue.java
Outdated
Show resolved
Hide resolved
...in/java/org/apache/dolphinscheduler/server/master/runner/GlobalTaskDispatchWaitingQueue.java
Outdated
Show resolved
Hide resolved
...r-master/src/main/java/org/apache/dolphinscheduler/server/master/cluster/ClusterManager.java
Outdated
Show resolved
Hide resolved
...er-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/DispatchWorker.java
Outdated
Show resolved
Hide resolved
...r-master/src/main/java/org/apache/dolphinscheduler/server/master/cluster/ClusterManager.java
Outdated
Show resolved
Hide resolved
The logic for the non-existence of workergroup needs to be supplemented.
…ce it back into the queue and wait.
…ario is rare and the logic is simplified for now, it will be left as a TODO.
…when adding tasks.
SbloodyS
left a comment
There was a problem hiding this comment.
I agree with this implementation, I just have some questions. After reviewing the code, I found that this PR is to put the failed tasks in the delayed queue and wait for a certain period of time before resubmitting, instead of actually dividing them into multiple queues according to the worker group as stated in the title, is that right? @det101
|
Please retry analysis of this Pull-Request directly on SonarQube Cloud |
If the global queue fails to be distributed to the workergoup queue, the queue will be delayed. If it has been distributed to the workergoup queue, the failure will only be placed in the workergoup's delay queue. |
Okay. |
… queue by worker group (apache#17037)

Purpose of the pull request
Simplify the GlobalTaskDispatchWaitingQueue to only handle sorting based on time.
Introduce a new WorkerGroup queue that sorts tasks based on priority and time, with priority being higher than time. Additionally, it is responsible for retrying failed tasks with a delay.
close #16260
Brief change log
This change added tests and can be verified as follows:
Pull Request Notice
Pull Request Notice
If your pull request contains incompatible change, you should also add it to
docs/docs/en/guide/upgrade/incompatible.md