[
https://issues.apache.org/jira/browse/SENTRY-1896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16157226#comment-16157226
]
Arjun Mishra commented on SENTRY-1896:
--------------------------------------
[~akolb] I found that setting detach all on commit when fetching results
improved performance. I verified this on a cluster with 4000 roles and queries
like "show tables" which would take up to 7 sec, only took 0.4 sec.
This specific change was checked in with SENTRY-1770 and SENTRY-1768. My
initial tests were done on branches that didn't have the specific change. And I
wasn't aware that SENTRY-1770, and SENTRY-1768 were created to address
performance improvements in fetching role names for groups, hence I had started
out with my own fix.
Long story short, SENTRY-1770 and SENTRY-1768 improves performance while
getting role names for groups. While we can continue to invest in a new
solution that would further reduce time from 0.4 sec, I don't see a need for
it.
No juice for the squeeze.
> Optimize retrieving role names for groups
> -----------------------------------------
>
> Key: SENTRY-1896
> URL: https://issues.apache.org/jira/browse/SENTRY-1896
> Project: Sentry
> Issue Type: Improvement
> Components: Sentry
> Affects Versions: 2.0.0
> Reporter: Arjun Mishra
> Assignee: Arjun Mishra
> Fix For: 2.0.0
>
> Attachments: SENTRY-1896.01.patch, SENTRY-1896.02.patch,
> SENTRY-1896.03.patch, SENTRY-1896.04.patch, SENTRY-1896.05.patch,
> SENTRY-1896.06.patch, SENTRY-1896.07.patch, SENTRY-1896.08.patch,
> SENTRY-1896.09.patch, SENTRY-1896.10.patch
>
>
> Right now when we get privileges from sentry, we pass in a provider like set
> of groups. Then we create a MSentryGroup object for each group and then get
> roles using the .getRoles() method. However, DataNucleus takes too long and
> the fetch doesn't seem to be lazy. This is bad since we only need the
> roleNames for the group and not the entire Role object.
> Instead running a SQL like query and just getting roleNames will drastically
> improve performance
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)