mirror of https://github.com/apache/activemq.git
Fixing leveldb replication bug where loosing quorum did not properly restart the master in a clean way.
This commit is contained in:
parent
afc0220147
commit
0b66abcbfb
|
@ -240,6 +240,17 @@ class ElectingLevelDBStore extends ProxyLevelDBStore {
|
|||
stopped_latch.countDown()
|
||||
func
|
||||
})
|
||||
master.blocking_executor.execute(^{
|
||||
val broker = brokerService
|
||||
if( broker!=null ) {
|
||||
try {
|
||||
broker.requestRestart();
|
||||
broker.stop();
|
||||
} catch {
|
||||
case e:Exception=> warn("Failure occurred while restarting the broker", e);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
def objectName = {
|
||||
|
|
|
@ -160,6 +160,7 @@ class MasterElector(store: ElectingLevelDBStore) extends ClusteredSingleton[Leve
|
|||
updating_store = true
|
||||
store.stop_master {
|
||||
elector.synchronized {
|
||||
updating_store = false
|
||||
info("Master stopped")
|
||||
address = null
|
||||
changed
|
||||
|
|
Loading…
Reference in New Issue