SbloodyS commented on code in PR #16488:
URL: 
https://github.com/apache/dolphinscheduler/pull/16488#discussion_r1726492157


##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/utils/DependentExecute.java:
##########
@@ -337,18 +337,27 @@ private ProcessInstance findLastProcessInterval(Long 
definitionCode, Long taskCo
     }
 
     /**
-     * get dependent result by task/process instance state
+     * get dependent result by task/process instance
      *
-     * @param state state
+     * @param processInstance process instance
+     * @param taskInstance task instance
      * @return DependResult
      */
-    private DependResult getDependResultByState(TaskExecutionStatus state) {
+    private DependResult getDependResultOfTask(ProcessInstance 
processInstance, TaskInstance taskInstance) {
 
+        TaskExecutionStatus state = taskInstance.getState();
         if (!state.isFinished()) {
             return DependResult.WAITING;
         } else if (state.isSuccess()) {
             return DependResult.SUCCESS;
         } else {
+            log.info("Task code: {}, task name: {}, retryTimes: {}, 
maxRetryTimes: {}",
+                    taskInstance.getTaskCode(), taskInstance.getName(), 
taskInstance.getRetryTimes(),
+                    taskInstance.getMaxRetryTimes());
+            if (processInstance.getState().isRunning()
+                    && taskInstance.getRetryTimes() < 
taskInstance.getMaxRetryTimes()) {
+                return DependResult.WAITING;
+            }

Review Comment:
   ```suggestion
               if (processInstance.getState().isRunning()
                       && taskInstance.getRetryTimes() < 
taskInstance.getMaxRetryTimes()) {
                   log.info("taskDefinitionCode: {}, taskDefinitionName: {}, 
retryTimes: {}, maxRetryTimes: {}",
                       taskInstance.getTaskCode(), taskInstance.getName(), 
taskInstance.getRetryTimes(),
                       taskInstance.getMaxRetryTimes());
                   return DependResult.WAITING;
               }
   ```



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