reele opened a new pull request, #11677: URL: https://github.com/apache/dolphinscheduler/pull/11677
<!--Thanks very much for contributing to Apache DolphinScheduler. Please review https://dolphinscheduler.apache.org/en-us/community/development/pull-request.html before opening a pull request.--> ## Purpose of the pull request ```xml <select id="queryLastTaskInstance" resultType="org.apache.dolphinscheduler.dao.entity.TaskInstance"> select <include refid="baseSql"/> from t_ds_task_instance where task_code=#{taskCode} <if test="startTime!=null and endTime != null"> and start_time <![CDATA[ >= ]]> #{startTime} and start_time <![CDATA[ <= ]]> #{endTime} </if> order by end_time desc limit 1 </select> <select id="queryLastTaskInstanceList" resultType="org.apache.dolphinscheduler.dao.entity.TaskInstance"> select <include refid="baseSql"/> from t_ds_task_instance where 1=1 <if test="taskCodes != null and taskCodes.size() != 0"> and task_code in <foreach collection="taskCodes" index="index" item="i" open="(" separator="," close=")"> #{i} </foreach> </if> <if test="startTime!=null and endTime != null"> and start_time <![CDATA[ >= ]]> #{startTime} and start_time <![CDATA[ <= ]]> #{endTime} </if> </select> ``` Now v2.0.6 and v2.0.7 dependent task use `start_time` to find the target task above, when the task is blocked by preview tasks and started in after days, the dependent task will never succeed. The same problem also occurs in `complement` tasks. ## Brief change log Use `process_instance_id` instead of `start_time`, and also follows the process_instance's `schedule_time`. -- 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]
