> On May 19, 2017, 6:26 p.m., Vadim Spector wrote:
> > sentry-core/sentry-core-common/src/main/java/org/apache/sentry/core/common/transport/UserGroupInformationInitializer.java
> > Line 36 (original), 40 (patched)
> > <https://reviews.apache.org/r/59317/diff/4-5/?file=1724185#file1724185line42>
> >
> >     Hmm ... how dit it end up reverting the fix?
> 
> Vamsee Yarlagadda wrote:
>     It had a much bigger potential problem:
>     
>     "One small concern, if multiple threads are trying to access this 
> function at the same time, only one of them would go inside the "if 
> (isInitialized.compareAndSet(false, true))" block. But how would we block 
> other threads from simply returning before the thread handling the "if" block 
> is complete?"

You are right, this case is possible. I've noticed that you declared 
isInitialized volatile, which should take care of cross-thread visibility, so 
it is fine now.


- Vadim


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


On May 19, 2017, 1:18 a.m., kalyan kumar kalvagadda wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59317/
> -----------------------------------------------------------
> 
> (Updated May 19, 2017, 1:18 a.m.)
> 
> 
> Review request for sentry, Alexander Kolbasov, Brian Towles, Hao Hao, Na Li, 
> Sergio Pena, Vamsee Yarlagadda, and Vadim Spector.
> 
> 
> Bugs: SENTRY-1736
>     https://issues.apache.org/jira/browse/SENTRY-1736
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> 1. Update the UserGroupInformation with HADOOP_SECURITY_AUTHENTICATION for 
> the client when kerberos is enabled.
> 2. Make sure that the update is not done for every connection towards sentry 
> server.
> 3. Don't update the configuration object that we passed. Instead use a local 
> version to update.
> 
> 
> Diffs
> -----
> 
>   
> sentry-core/sentry-core-common/src/main/java/org/apache/sentry/core/common/transport/SentryTransportFactory.java
>  9b9f9e8 
>   
> sentry-core/sentry-core-common/src/main/java/org/apache/sentry/core/common/transport/UserGroupInformationInitializer.java
>  PRE-CREATION 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericServiceClientDefaultImpl.java
>  b7ac640 
> 
> 
> Diff: https://reviews.apache.org/r/59317/diff/5/
> 
> 
> Testing
> -------
> 
> Made sure that Solr client is able to talk to sentry with kerberos enabled.
> 
> 
> Thanks,
> 
> kalyan kumar kalvagadda
> 
>

Reply via email to