det101 commented on code in PR #17037:
URL: 
https://github.com/apache/dolphinscheduler/pull/17037#discussion_r2026613234


##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/GlobalTaskDispatchWaitingQueueLooper.java:
##########
@@ -65,24 +66,20 @@ public void run() {
     }
 
     void doDispatch() {
-        final ITaskExecutionRunnable taskExecutionRunnable = 
globalTaskDispatchWaitingQueue.takeTaskExecuteRunnable();
-        final TaskInstance taskInstance = 
taskExecutionRunnable.getTaskInstance();
-        try {
-            final TaskExecutionStatus status = taskInstance.getState();
-            if (status != TaskExecutionStatus.SUBMITTED_SUCCESS && status != 
TaskExecutionStatus.DELAY_EXECUTION) {

Review Comment:
   
   
   > Thank you for bringing this up. I have moved the status check to the 
WorkerGroupTaskDispatcher. I believe this change should ensure that the task 
instance can be removed after being killed. Placing the status check in the 
global queue could indeed be a better approach. I’m happy to explore that 
option further if you think it would improve the process.
   
    After some consideration, I have decided to add status checks in the global 
queue as well.
   



-- 
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