calvinjiang commented on code in PR #13261:
URL: 
https://github.com/apache/dolphinscheduler/pull/13261#discussion_r1055356054


##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java:
##########
@@ -597,8 +597,10 @@ public PageInfo<ProcessDefinition> 
queryProcessDefinitionListPaging(@NonNull Use
             // todo: use batch query
             ProcessDefinitionLog processDefinitionLog =
                     
processDefinitionLogMapper.queryByDefinitionCodeAndVersion(pd.getCode(), 
pd.getVersion());
-            User user = 
userMapper.selectById(processDefinitionLog.getOperator());
-            pd.setModifyBy(user.getUserName());
+            User modifiedUser = 
userMapper.selectById(processDefinitionLog.getOperator());
+            pd.setModifyBy(modifiedUser.getUserName());
+            User createUser = 
userMapper.selectById(processDefinitionLog.getUserId());

Review Comment:
   Sure. It definitely increase the load on the database. I'll adjust the way 
to query users.



##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java:
##########
@@ -597,8 +597,10 @@ public PageInfo<ProcessDefinition> 
queryProcessDefinitionListPaging(@NonNull Use
             // todo: use batch query
             ProcessDefinitionLog processDefinitionLog =
                     
processDefinitionLogMapper.queryByDefinitionCodeAndVersion(pd.getCode(), 
pd.getVersion());
-            User user = 
userMapper.selectById(processDefinitionLog.getOperator());
-            pd.setModifyBy(user.getUserName());
+            User modifiedUser = 
userMapper.selectById(processDefinitionLog.getOperator());
+            pd.setModifyBy(modifiedUser.getUserName());
+            User createUser = 
userMapper.selectById(processDefinitionLog.getUserId());

Review Comment:
   Sure. It definitely increases the load on the database. I'll adjust the way 
to query users.



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