lenboo commented on a change in pull request #7234:
URL: https://github.com/apache/dolphinscheduler/pull/7234#discussion_r763722273



##########
File path: 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskDefinitionServiceImpl.java
##########
@@ -530,13 +548,18 @@ public Result queryTaskDefinitionListPaging(User 
loginUser,
                     }
                 }
                 taskDefinition.setFlag(Flag.YES);
-                taskDefinitionMapper.updateById(taskDefinition);
+                taskDefinitionLog.setFlag(Flag.NO);
                 break;
             default:
                 putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, 
RELEASESTATE);
                 return result;
         }
-
+        int update = taskDefinitionMapper.updateById(taskDefinition);
+        int updateLog = taskDefinitionLogMapper.updateById(taskDefinitionLog);
+        if ((update == 0 && updateLog == 1) || (update == 1 && updateLog == 
0)) {

Review comment:
       is this can change to (update & updateLog) 




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