Skip to content

Commit 4b38848

Browse files
authored
[Fix-17187][Dependent Task] finish dependent task error (#17188)
1 parent 8491216 commit 4b38848

3 files changed

Lines changed: 1 addition & 18 deletions

File tree

dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/TaskInstanceContextMapper.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ List<TaskInstanceContext> queryListByTaskInstanceIdAndContextType(@Param("taskIn
3434
int deleteByTaskInstanceIdAndContextType(@Param("taskInstanceId") int taskInstanceId,
3535
@Param("contextType") ContextType contextType);
3636

37-
int updateTaskInstanceContextByTaskInstanceIdAndContextType(@Param("taskInstanceId") int taskInstanceId,
38-
@Param("contextType") ContextType contextType,
39-
@Param("context") String context);
40-
4137
List<TaskInstanceContext> batchQueryByTaskInstanceIdsAndContextType(@Param("taskInstanceIds") List<Integer> taskInstanceIds,
4238
@Param("contextType") ContextType contextType);
4339
}

dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/repository/impl/TaskInstanceContextDaoImpl.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
import org.apache.dolphinscheduler.common.constants.Constants;
2121
import org.apache.dolphinscheduler.common.enums.ContextType;
22-
import org.apache.dolphinscheduler.common.utils.JSONUtils;
2322
import org.apache.dolphinscheduler.dao.entity.AbstractTaskInstanceContext;
2423
import org.apache.dolphinscheduler.dao.entity.DependentResultTaskInstanceContext;
2524
import org.apache.dolphinscheduler.dao.entity.TaskInstanceContext;
@@ -89,9 +88,7 @@ public int upsertTaskInstanceContext(TaskInstanceContext taskInstanceContext) {
8988
+ o.getDateCycle()))),
9089
ArrayList::new));
9190
taskInstanceContext.setTaskInstanceContext(deduplicatedDependentResultTaskInstanceContextList);
92-
return mybatisMapper.updateTaskInstanceContextByTaskInstanceIdAndContextType(
93-
taskInstanceContext.getTaskInstanceId(),
94-
taskInstanceContext.getContextType(), JSONUtils.toJsonString(taskInstanceContext.getContext()));
91+
return mybatisMapper.updateById(taskInstanceContext);
9592
}
9693
}
9794

dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/TaskInstanceContextMapper.xml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,6 @@
3939
AND context_type = #{contextType}
4040
</delete>
4141

42-
<update id="updateTaskInstanceContextByTaskInstanceIdAndContextType">
43-
UPDATE t_ds_task_instance_context
44-
SET
45-
context = #{context}
46-
,update_time = now()
47-
WHERE 1=1
48-
AND task_instance_id = #{taskInstanceId}
49-
AND context_type = #{contextType}
50-
</update>
51-
5242
<select id="batchQueryByTaskInstanceIdsAndContextType" resultType="org.apache.dolphinscheduler.dao.entity.TaskInstanceContext">
5343
SELECT
5444
id

0 commit comments

Comments
 (0)