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


##########
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProcessTaskRelationMapper.xml:
##########
@@ -200,7 +200,11 @@
             and post_task_code = #{postTaskCode}
         </if>
     </select>
-
+    <select id="queryByWorkGroupName" 
resultType="org.apache.dolphinscheduler.dao.entity.ProcessTaskRelation">
+        select
+            relation.id
+        from t_ds_process_task_relation relation, t_ds_task_definition_log log 
where
+        log.code = relation.post_task_code and log.worker_group = 
#{workerGroupName}

Review Comment:
   When user delete workerGroup, is it better to check references in 
`t_ds_task_definition`, but not `t_ds_task_definition_log`? 
   If just the old version taskDefinition has this references, can it allow to 
delete?
   
   cc @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