tangchunbo commented on a change in pull request #8309:
URL: https://github.com/apache/dolphinscheduler/pull/8309#discussion_r802230329



##########
File path: 
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
##########
@@ -2416,7 +2416,13 @@ public int saveTaskRelation(User operator, long 
projectCode, long processDefinit
         Map<Long, TaskDefinitionLog> taskDefinitionLogMap = null;
         if (CollectionUtils.isNotEmpty(taskDefinitionLogs)) {
             taskDefinitionLogMap = taskDefinitionLogs.stream()
-                    .collect(Collectors.toMap(TaskDefinition::getCode, 
taskDefinitionLog -> taskDefinitionLog));
+                    .collect(
+                        Collectors.toMap(
+                            TaskDefinition::getCode,
+                            taskDefinitionLog -> taskDefinitionLog,
+                            (entityOld , entityNew) -> entityOld

Review comment:
       @JinyLeeChina plz check this. i am not sure its as same as the issue 
#8043.
   
   the logic maybe like this according to @JinyLeeChina .
   
   any part of the workflow changed would lead to the workflow's version 
change. so when you changed one taskDefinition, the taskDefinition has two 
version now, but the workflow doesn`t. When ui query this workflow it returns 
two taskDefinition with same code but different version and this cause the 
duplicate error




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