> On May 17, 2017, 8:02 p.m., Na Li wrote: > > sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java > > Lines 134 (patched) > > <https://reviews.apache.org/r/59350/diff/1/?file=1723426#file1723426line134> > > > > What is the desirable behavior if the input conf is different from the > > original conf used to create SentryStore?
This is what happens for tests (but not for prod code) - usually tests want an updated config to be used. That's why we provide the reset mechanism. > On May 17, 2017, 8:02 p.m., Na Li wrote: > > sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java > > Lines 145 (patched) > > <https://reviews.apache.org/r/59350/diff/1/?file=1723426#file1723426line145> > > > > Could you simplify it to be "instance.compareAndSet(null); return > > instance.get()"? If the store is set, instance.get() returns store. It is > > easier to read the code. This wouldn't be correct - the store may be not set in which case instance.get() will return null. This code is updated a bit in the new patch. - Alexander ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/59350/#review175305 ----------------------------------------------------------- On May 17, 2017, 7:19 p.m., Alexander Kolbasov wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/59350/ > ----------------------------------------------------------- > > (Updated May 17, 2017, 7:19 p.m.) > > > Review request for sentry, Brian Towles, Hao Hao, kalyan kumar kalvagadda, Na > Li, Sergio Pena, and Vamsee Yarlagadda. > > > Bugs: SENTRY-1743 > https://issues.apache.org/jira/browse/SENTRY-1743 > > > Repository: sentry > > > Description > ------- > > SENTRY-1743: Two SentrySTore instances are one too many > > > Diffs > ----- > > > sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/generic/service/persistent/DelegateSentryStore.java > 3be6a0bf38d03f81df4aae3a878d1e6ecae52be7 > > sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java > f0d2a6b3a74d8d88976aeec32bba901d02e8329f > > sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryAdminServlet.java > 8a8bbd35c1e327fb8b613311daaafef46561b2bb > > sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyStoreProcessor.java > e9d9eec3526f2894199e81a253709dc3ed380b5b > > sentry-tests/sentry-tests-sqoop/src/test/java/org/apache/sentry/tests/e2e/sqoop/AbstractSqoopSentryTestBase.java > 67de5acb36797b23261e5023c308222ad3344ea7 > > > Diff: https://reviews.apache.org/r/59350/diff/1/ > > > Testing > ------- > > > Thanks, > > Alexander Kolbasov > >
