You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/11/19 04:15:37 UTC

[GitHub] [dolphinscheduler] zhongjiajie commented on a change in pull request #6904: [DS-6891][MasterServer] reduce db operation when process instance running

zhongjiajie commented on a change in pull request #6904:
URL: https://github.com/apache/dolphinscheduler/pull/6904#discussion_r752850991



##########
File path: dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumer.java
##########
@@ -130,14 +130,16 @@ protected boolean dispatch(TaskPriority taskPriority) {
             TaskExecutionContext context = taskPriority.getTaskExecutionContext();
             ExecutionContext executionContext = new ExecutionContext(context.toCommand(), ExecutorType.WORKER, context.getWorkerGroup());
 
-            if (taskInstanceIsFinalState(taskPriority.getTaskId())) {
-                // when task finish, ignore this task, there is no need to dispatch anymore
-                return true;
-            } else {
-                result = dispatcher.dispatch(executionContext);
+            if (isTaskNeedToCheck(taskPriority)) {

Review comment:
       test




-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org