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 2022/12/22 10:04:34 UTC

[GitHub] [dolphinscheduler] SbloodyS commented on a diff in pull request #13261: [Fix-13260][API] Ironed out the issue with lacking the value of user's name when querying the list of workflow definitions.

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


##########
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:
   If the pageSize is large, the number of queries to the database will double. This will increase the load on the database.



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