You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/12/07 07:58:18 UTC

[GitHub] [dolphinscheduler] lenboo commented on a change in pull request #7234: [cherry-pick-7221/7232] pick some api bug

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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org