You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "huangsheng (Jira)" <ji...@apache.org> on 2023/07/03 06:15:00 UTC

[jira] [Commented] (KYLIN-5599) In the scenario where there are many users in the user group, the performance of assigning users to the user group is extremely poor

    [ https://issues.apache.org/jira/browse/KYLIN-5599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17739447#comment-17739447 ] 

huangsheng commented on KYLIN-5599:
-----------------------------------

h1. Root Cause:

 
{code:java}

{code}
*kylin/api/user?page_size=100&page_offset=0&name=*

This interface is requested by paging, 100 items each time. The returned user contains the assigned user. In order to ensure that unassigned users get more than 100 each time, they will be automatically requested until the total number of requested users - the number of assigned users>=100.

 
h1. Design:

Currently the users assigned to the group are obtained through the api
{code:java}
 GET /kylin/api/user_group/users_with_group?page_size=20&page_offset=0.{code}
 

Unassigned users are obtained through
{code:java}
 GET kylin/api/user{code}
The backend only needs to be able to return the list of unassigned users of the user group.

 

 

So we can add an API or add two optional parameters to the original API (e.g. groupName and isReturnUnassigned, since the original API GET kylin/api/user is also called in other places, it is more appropriate to add an API), Returns a list of users who are not assigned to the specified usergroup.

 
{code:java}
GET kylin/api/user/unassigned_users
{code}
 * group_name - required string, user group name.
 * name - optional string, username.
 * is_case_sensitive - optional boolean, whether the fuzzy matching of user names is case-sensitive or not by default.
 * page_offset - optional int, pagination page, default is 0.
 * page_size - optional int, page size, default is 10.

> In the scenario where there are many users in the user group, the performance of assigning users to the user group is extremely poor
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: KYLIN-5599
>                 URL: https://issues.apache.org/jira/browse/KYLIN-5599
>             Project: Kylin
>          Issue Type: New Feature
>          Components: REST Service
>    Affects Versions: 5.0-alpha
>            Reporter: huangsheng
>            Assignee: huangsheng
>            Priority: Blocker
>             Fix For: 5.0-alpha, 5.0-beta
>
>
> Currently, in my development environment, there are 2w+ users in a user group, and 1w+ users in the production environment. In the scenario where there are many users in the user group, the performance of assigning users to the user group is extremely poor.
> So I want to ensure that when the number of users in the user group is more than 20,000, assign users to the user group to respond within a reasonable time (such as 10 seconds)



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