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 2021/06/19 16:34:49 UTC

[GitHub] [dolphinscheduler] kyoty removed a comment on pull request #5651: [WIP][Bug Fix]The owner field in file management is always displayed empty.

kyoty removed a comment on pull request #5651:
URL: https://github.com/apache/dolphinscheduler/pull/5651#issuecomment-864191593


   Sorry for the delay.
   I resubmit the code to try to solve this problem.
   
   + Why the owner field can't worked as expected?
   
     + In pr: #4442,  a new filed `owner` was introduced to display who owns the resource.  In my opinion, the implementation in the pr is incorrect. The join query in the db sql can get the correct `username`, but in the `ResourceMapper`, the `Resource class` is used to construct the data returned by the db query.  **Please note that the Resource class does not have a userName field, which results in that the userName can't be actually returned to front end**.
   
       I simulated the modification of this pr in my environment, which confirmed my inference.
   
     + in pr: #4947 This pr is mainly to solve some obvious slow query problems, but the join query about username does not feel like a bottleneck. The join query was completely removed, which resulted in the `username` can't be seen in the sql.
   
   + How to solve this?
   
     + The simplest way to solve this is to add a `userName` in `Resource`, but at present, the `Resource class` actually has a` userid` field. The` username` intends for display and would not participate in the update/delete of the resource. I think this solution is not suitable.
     + Inspired by ruanwenjun’s suggestion, I tried to create a new class, specifically for paging query, to avoid re-adding redundant and meaningless fields in the resource.
   
   @CalvinKirs  @ruanwenjun  any good idea?   I am not familiar with persistence frameworks like mybatis. I'm not sure if I'm on the right path. I look forward to your suggestions. 😜 


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org