> On Jan. 7, 2017, 4:25 a.m., Vamsee Yarlagadda wrote: > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/LeaderStatusMonitor.java, > > line 251 > > <https://reviews.apache.org/r/55190/diff/3/?file=1598341#file1598341line251> > > > > Just curious to know how this works, if the server is elected as a > > leader this method gets called and blocked on the condition. When someone > > calls deactivate, the blocked thread would resume and simply set the status > > isLeader as false. But how are we telling the curator framework to remove > > the ZK znode that removes the leader status for the server?
We tell Curator framework to drop the leader status by returning from this callback. - Alexander ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/55190/#review160806 ----------------------------------------------------------- On Jan. 6, 2017, 6:06 a.m., Alexander Kolbasov wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/55190/ > ----------------------------------------------------------- > > (Updated Jan. 6, 2017, 6:06 a.m.) > > > Review request for sentry, Colin Ma, Misha Dmitriev, Dapeng Sun, Hao Hao, > kalyan kumar kalvagadda, Vamsee Yarlagadda, and Vadim Spector. > > > Bugs: SENTRY-1583 > https://issues.apache.org/jira/browse/SENTRY-1583 > > > Repository: sentry > > > Description > ------- > > - Restored HAContext class > - Removed Fencing support from HA > - Removed Activator, Activators, and LeaderStatus classes > - Renamed LeaderStatusAdaptor to LeaderStatusMonitor which is now the sole > class responsible for leader status monitoring. > > > Diffs > ----- > > pom.xml df26edf74c04fffcd9fbc3da07e949362eb94728 > > sentry-core/sentry-core-common/src/main/java/org/apache/sentry/core/common/utils/SentryConstants.java > c094058142706a6b564c54fa69ddff5f1e2e5048 > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/HAContext.java > PRE-CREATION > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryMetrics.java > f80605c4d68ef266a24e65d14f51066388b48417 > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/Activator.java > c3df4d8a6568f236dc5e05ab190cd1f484f7967a > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/Activators.java > 2926eeb97ec450f12d0d08086165c091709ead99 > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/LeaderStatus.java > 2467921b3cdc9ebd267d308d5cdcce52a836f207 > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/LeaderStatusAdaptor.java > e87b3d13dcf2d10eb7ef00d21b8fa8846b4d16c0 > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/LeaderStatusMonitor.java > PRE-CREATION > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java > a9d49f86961f1ced1af40afcfe6172f884a23d44 > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ServiceConstants.java > d80fa1e71c165b7f1faf1c50c451e049d76b770b > > sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestActivator.java > 60cfc735832433fb4dbeae1c2d617dd713fc3f3e > > sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceMetrics.java > bc375e32685dcbcbf0b6398856dceced3de789e6 > > sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/service/thrift/TestLeaderStatus.java > c796fabc21005479fa6afc687cf1df7af76538a9 > > Diff: https://reviews.apache.org/r/55190/diff/ > > > Testing > ------- > > Performed manual testing with two instances of Sentry running. Tried the > following actions: > > - Sending SIGUSR2 to processes which changes leadership status (verified via > log messages and emtrics) > - Killing active server - new sserver is elected as a leader > - Restarting ZK service - a leader is elected once ZK service is back. > > > Thanks, > > Alexander Kolbasov > >
