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


##########
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 your concern. I have moved the status check to the 
WorkerGroupTaskDispatcher, which should prevent the task instance from not 
being removable after being killed. However, I understand that moving it to the 
global queue for an early check is also a viable option. I appreciate your 
feedback and will keep this in mind for further improvements.



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