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 2022/09/08 08:49:37 UTC

[GitHub] [dolphinscheduler] reele commented on a diff in pull request #11677: [Fix][2.0.6-2.0.7] Fix dependent task cannot detect target task finished across days

reele commented on code in PR #11677:
URL: https://github.com/apache/dolphinscheduler/pull/11677#discussion_r965682277


##########
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/TaskInstanceMapper.java:
##########
@@ -81,7 +81,7 @@ IPage<TaskInstance> queryTaskInstanceListPaging(IPage<TaskInstance> page,
      * @param endTime endTime
      * @return task instance
      */
-    TaskInstance queryLastTaskInstance(@Param("taskCode") long taskCode, @Param("startTime") Date startTime, @Param("endTime") Date endTime);
+    TaskInstance queryLastTaskInstance(@Param("taskCode") long taskCode, @Param("processInstanceId") long processInstanceId);

Review Comment:
   because taskInstance don't keep the `scheduleTime`, but processInstance do, if only use start_time, and processInstance start with a scheduleTime, the dependent node will use `scheduleTime` to calculate a `bizdate` to find the task, it may can't detect the task in original `bizdate`.
   
   the actual situation I have encountered is:
   etl task `B` processes a zipper table, it must run continuously by date, it's previews dependent task `D`  depends on `A[T]` and `B[T-1](self yesterday)`, in some reason, `A` blocked until the `next day`, so `B.startTime` is `[T+1]`, and next day `D` will use `bizdate[T]` calculated by `scheduleTime[T+1]`  to finding `B[T]`, there is no `B` started on time `[T]`, that maks 
    dependent task `D[T+1]` will never stop, every time this happens, I need to manually stop the processInstance, and set the state of `D` to `Forced Success`.
   
   In fact taskInstance can only run attached to a processInstance, so I think it is right to find taskInstance through processInstance, and in 2.0.5, it did in the same way.



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