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 startTime, and processInstance start with a scheduleTime, the
dependent node will use `scheduleTime` to find the task, it may can't detect
the task in original `scheduleTime`.
the actual situation I have encountered is:
etl task `B` processes a zipper table, it must run continuously by date, and
used the parameter `system.biz.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
`scheduleTime[T]` calculated by `scheduleTime[T+1]` to finding `B[T]`, there
is no `B` started at time `[T]`, so the dependent task `D[T+1]` will never
finished, every time this happens, I need to manually stop the processInstance,
and set the state of `D` to `Forced Success`, and recover the process.
In fact taskInstance can only run attached to a processInstance, and
taskInstance's system.biz.date parameter is same as 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]