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

Review request for sentry, Alexander Kolbasov, Arjun Mishra, and Sergio Pena.


Repository: sentry


Description
-------

In sentry HA setup, When curator framework is closed before leader lock is 
released, after sentry service restart without restarting zookeeper, sentry 
servers cannot get leader lock, and therefore there will be no leader in sentry 
to sync with HMS.
The fix is to control the shutdown order and make sure the leader lock is 
released before curator framework is closed.


Diffs
-----

  
sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/HAContext.java
 71865ca 
  
sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/LeaderStatusMonitor.java
 0a208d4 
  
sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/persistent/TestLeaderStatusMonitor.java
 395516c 


Diff: https://reviews.apache.org/r/66675/diff/1/


Testing
-------

add Unit test case to verify that the exception "ERROR 
sentry.org.apache.curator.framework.recipes.leader.LeaderSelector: The leader 
threw an exception java.lang.IllegalStateException: instance must be started 
before calling this method" does not happen


Thanks,

Na Li

Reply via email to