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

Review request for sentry and Sravya Tirukkovalur.


Bugs: SENTRY-315
    https://issues.apache.org/jira/browse/SENTRY-315


Repository: sentry


Description
-------

In case of 'SET ROLE' and 'SHOW CURRENT ROLE' sentry client tries to get all 
the roles available to the current user. The server resolves all the groups 
that the user belongs to, and then list all roles granted for each of these 
groups. The problem is that if one of the groups is not granted any roles, then 
the underlying SentryStore API throws NoSuchObject exception. This is 
propagated back to the client.
The patch is to ignore this exception in cases like 'SET ROLE' and 'SHOW 
CURRENT ROLE' and continue collecting roles.


Diffs
-----

  
sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java
 78f41d3 
  
sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyStoreProcessor.java
 8964a18 
  
sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/persistent/TestSentryStore.java
 acc8b3a 
  
sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDatabaseProvider.java
 200ea55 

Diff: https://reviews.apache.org/r/23123/diff/


Testing
-------

Added unit and end to end test case.


Thanks,

Prasad Mujumdar

Reply via email to