SbloodyS commented on code in PR #13257:
URL: 
https://github.com/apache/dolphinscheduler/pull/13257#discussion_r1055241291


##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java:
##########
@@ -1125,6 +1125,15 @@ public int 
createComplementDependentCommand(List<Schedule> schedules, Command co
                         CronUtils.getMaxCycle(schedules.get(0).getCrontab()), 
dependentCommand.getWorkerGroup());
         dependentCommand.setTaskDependType(TaskDependType.TASK_POST);
         for (DependentProcessDefinition dependentProcessDefinition : 
dependentProcessDefinitionList) {
+
+            long processDefinitionCode = 
dependentProcessDefinition.getProcessDefinitionCode();
+            ProcessDefinition processDefinition = 
processService.findProcessDefinitionByCode(processDefinitionCode);

Review Comment:
   Querying data in a long loop will result in poor performance. We should 
avoid this.



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