----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/23123/#review46904 -----------------------------------------------------------
Ship it! sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyStoreProcessor.java <https://reviews.apache.org/r/23123/#comment82477> Nit: Not part of this patch, but I wonder if we can make this part of the code more readable. Right now "show current role" is equivalent to "show role grant group ALL" which is not intuitive. - Sravya Tirukkovalur On June 27, 2014, 7:47 a.m., Prasad Mujumdar wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/23123/ > ----------------------------------------------------------- > > (Updated June 27, 2014, 7:47 a.m.) > > > 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 > >
