> On June 21, 2016, 12:55 p.m., Sravya Tirukkovalur wrote:
> > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/LeaderStatus.java,
> >  line 75
> > <https://reviews.apache.org/r/48761/diff/1/?file=1420478#file1420478line75>
> >
> >     May be comment on why is this an AtomicBoolean? Need for thread safety?
> 
> Colin McCabe wrote:
>     I used AtomicBoolean so that closing LeaderStatus more than once only 
> causes close() to run once.  I'll add a comment.
> 
> Sravya Tirukkovalur wrote:
>     Sounds good. But, I am trying to understand if there a need for 
> LeaderStatus to be thread safe? If not, there is no chance of close being 
> called concurrently right? Serial calls to close() is not a problem with a 
> plain boolean.

Basically, since LeaderStatus is multi-threaded, developers would reasonably 
expect it to be thread-safe unless there was a documemnted reason otherwise


> On June 21, 2016, 12:55 p.m., Sravya Tirukkovalur wrote:
> > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/LeaderStatusAdaptor.java,
> >  line 163
> > <https://reviews.apache.org/r/48761/diff/1/?file=1420479#file1420479line163>
> >
> >     What is the behavior if becomeStandby fails? There might be more than 
> > one leader?
> 
> Colin McCabe wrote:
>     There is never more than one leader.  If becomeStandby fails, then the 
> current daemon has failed to become the leader and it will release its ZK 
> resources.
> 
> Sravya Tirukkovalur wrote:
>     hm. I do not see a throws Exception contract for the becomeStandby() 
> function in Listener interface?

The idea is that becoming the standby is not an operation that can fail.  If 
you try to fail, we will ignore the failure and make you the standby anyway.


- Colin


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


On June 22, 2016, 7:42 p.m., Colin McCabe wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/48761/
> -----------------------------------------------------------
> 
> (Updated June 22, 2016, 7:42 p.m.)
> 
> 
> Review request for sentry.
> 
> 
> Bugs: SENTRY-1316
>     https://issues.apache.org/jira/browse/SENTRY-1316
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Implement Sentry leadership election
> 
> 
> Diffs
> -----
> 
>   
> sentry-hdfs/sentry-hdfs-common/src/main/java/org/apache/sentry/hdfs/SentryHDFSServiceClientFactory.java
>  6c9c8bb 
>   
> sentry-hdfs/sentry-hdfs-common/src/main/java/org/apache/sentry/hdfs/ha/HdfsHAClientInvocationHandler.java
>  6138b8c 
>   
> sentry-hdfs/sentry-hdfs-service/src/main/java/org/apache/sentry/hdfs/MetastorePluginWithHA.java
>  6476a01 
>   
> sentry-hdfs/sentry-hdfs-service/src/main/java/org/apache/sentry/hdfs/UpdateForwarder.java
>  7387281 
>   
> sentry-hdfs/sentry-hdfs-service/src/main/java/org/apache/sentry/hdfs/UpdateForwarderWithHA.java
>  574627c 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/ServiceManager.java
>  9f921d4 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HAClientInvocationHandler.java
>  d97a07e 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/LeaderStatus.java
>  PRE-CREATION 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/LeaderStatusAdaptor.java
>  PRE-CREATION 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java
>  6883bf4 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryServiceClientFactory.java
>  48ee66a 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryServiceClientPoolFactory.java
>  3a38b24 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ServiceConstants.java
>  32a4044 
>   
> sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/persistent/TestSentryServiceDiscovery.java
>  7cbcc11 
>   
> sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServerForHaWithoutKerberos.java
>  6c78942 
>   
> sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServerForPoolHAWithoutKerberos.java
>  9ba7d23 
>   
> sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceForHAWithKerberos.java
>  813b30b 
>   
> sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceForPoolHAWithKerberos.java
>  acb906f 
>   
> sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/service/thrift/TestLeaderStatus.java
>  PRE-CREATION 
>   
> sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/ha/TestHaEnd2End.java
>  07d74b5 
>   
> sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/AbstractTestWithStaticConfiguration.java
>  ced9d1c 
> 
> Diff: https://reviews.apache.org/r/48761/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Colin McCabe
> 
>

Reply via email to