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

Kalyan Kalvagadda commented on SENTRY-2557:
-------------------------------------------

*Root Cause:* As part of SENTRY-1896, there was change added to fetch the 
dependent DAO objects to save time in multiple database lookups.

 

This was applied to all the SentryStore API's which is not correct. I agree 
that changes added as part of SENTRY-1896 are needed but not to all API's.

For example Below method does not need to fetch associated roles/users along 
with the permissions. If there are huge number of Roles/Users, this will take 
huge amount of time.

 
{code:java}
private List<MSentryPrivilege> getMSentryPrivileges(final SentryPrincipalType 
entityType, final Set<String> entityNames, final TSentryAuthorizable 
authHierarchy) throws Exception {
{code}

> Queries are running too slow after when there are more than 4k roles
> --------------------------------------------------------------------
>
>                 Key: SENTRY-2557
>                 URL: https://issues.apache.org/jira/browse/SENTRY-2557
>             Project: Sentry
>          Issue Type: Bug
>          Components: sentrystore
>    Affects Versions: 2.2.0, 2.3.0
>            Reporter: Kalyan Kalvagadda
>            Assignee: Kalyan Kalvagadda
>            Priority: Critical
>
> When there are more than 4k roles Hive queries are very slow below because of 
> the time it spends on the compile phase because of the delay in fetching the 
> permissions.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to