> On Aug. 15, 2018, 7:37 p.m., Na Li wrote:
> > Should you update list_sentry_roles_by_group in 
> > SentryGenericPolicyProcessor.java as well? so it takes only one transaction 
> > to list roles by group when group is null or a list of group names.

New patch should reflect that. Thanks.


- Arjun


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/64661/#review207346
-----------------------------------------------------------


On Aug. 15, 2018, 12:26 p.m., Arjun Mishra wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/64661/
> -----------------------------------------------------------
> 
> (Updated Aug. 15, 2018, 12:26 p.m.)
> 
> 
> Review request for sentry, kalyan kumar kalvagadda, Na Li, Steve Moist, and 
> Sergio Pena.
> 
> 
> Bugs: SENTRY-1944
>     https://issues.apache.org/jira/browse/SENTRY-1944
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> When Solr is using Sentry server for authorization, it issues a lot of calls 
> to getGroupsByRoles() function in DelegateSentryStore.
> 
> This function isn't very efficient - it walks over each role in the set, 
> obtains role by name, get groups for each role, and collects all group names 
> into a set.
> 
> It may be possible to optimize it.
> 
> Also, in SentryGenericPolicyProcessor class method 
> list_sentry_roles_by_group() would make N transactions to build the roles to 
> set of groups map. Instead, make it to a single transaction. This will 
> significantly speed up operation
> 
> Attach one or more files to this issue
> 
> 
> Diffs
> -----
> 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/persistent/DelegateSentryStore.java
>  4cb46abc5 
>   
> sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/service/persistent/TestDelegateSentryStore.java
>  69d16238f 
> 
> 
> Diff: https://reviews.apache.org/r/64661/diff/4/
> 
> 
> Testing
> -------
> 
> mvn -f sentry-provider/sentry-provider-db/pom.xml test
> 
> 
> Thanks,
> 
> Arjun Mishra
> 
>

Reply via email to