caishunfeng commented on code in PR #12177:
URL: https://github.com/apache/dolphinscheduler/pull/12177#discussion_r983177326


##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java:
##########
@@ -681,6 +682,7 @@ public Result deleteProcessDefinitionByCode(@ApiIgnore 
@RequestAttribute(value =
     @ResponseStatus(HttpStatus.OK)
     @ApiException(BATCH_DELETE_PROCESS_DEFINE_BY_CODES_ERROR)
     @AccessLogAnnotation(ignoreRequestArgs = "loginUser")
+    @Transactional

Review Comment:
   I think we should not add this annotation in controller layer.
   It would better to create a batch delete method in service if we want to do 
that.



##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java:
##########
@@ -681,6 +682,7 @@ public Result deleteProcessDefinitionByCode(@ApiIgnore 
@RequestAttribute(value =
     @ResponseStatus(HttpStatus.OK)
     @ApiException(BATCH_DELETE_PROCESS_DEFINE_BY_CODES_ERROR)
     @AccessLogAnnotation(ignoreRequestArgs = "loginUser")
+    @Transactional

Review Comment:
   BTW, I don't think this batch delete action should be transactional, because 
different workflows are independent of each other, not an atomic relationship.
   WDYT? @zhongjiajie @ruanwenjun @SbloodyS 



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