You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Ruixuan Zhang (Jira)" <ji...@apache.org> on 2023/02/27 08:48:00 UTC

[jira] [Resolved] (KYLIN-5457) When the number of users is very large, granting users project-level access has poor performance and authorization fails

     [ https://issues.apache.org/jira/browse/KYLIN-5457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ruixuan Zhang resolved KYLIN-5457.
----------------------------------
    Resolution: Fixed

> When the number of users is very large, granting users project-level access has poor performance and authorization fails
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: KYLIN-5457
>                 URL: https://issues.apache.org/jira/browse/KYLIN-5457
>             Project: Kylin
>          Issue Type: Bug
>    Affects Versions: 5.0-alpha
>            Reporter: Ruixuan Zhang
>            Assignee: Ruixuan Zhang
>            Priority: Major
>             Fix For: 5.0-alpha
>
>         Attachments: image-2023-02-17-17-03-47-187.png, image-2023-02-17-17-04-19-788.png
>
>
> h2. Root Cause
> 第一点,已经是项目授权的用户,在给项目添加用户时,是无法搜到的。这个是产品现有行为。
> 看代码发现,代码内部复杂度较高。
> 在展示项目内授权用户列表时,会检查项目内每个用户是否存在(这个动作会listAll所有用户),几个用户就listAll几次
> 本地4000用户,项目授权100个用户,打开页面请求加载花了10s
> 给项目添加用户授权时,每个用户都要listAll。
> 对于判断用户、用户组是否存在的方法,代码中会listAll,其实是没必要的
> 因此基本上可以断定是因为代码复杂度高,多了很多无用的遍历。导致页面一直加载不出来,所以客户才误以为项目内看不到已授权的用户,但是模糊搜索就可以看到。
>  
> h2. Fix Design
> 修复方法主要是代码优化
>  # 判断用户是否存在
>  # NKylinUserManager get 方法优化
>  # listUserGroup 方法优化
> h2.  Test
> 36297 用户,单个项目授权442个用户
> 1、项目授权用户列表
> !image-2023-02-17-17-03-47-187.png!
> 2、项目内授权100个用户权限
>  !image-2023-02-17-17-04-19-788.png! 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)