Adding more debug info to help trouble shoot election issues with leveldb replication elections.

This commit is contained in:
Hiram Chirino 2013-10-02 10:45:47 -04:00
parent 887ac0ba49
commit 8804341c19
2 changed files with 4 additions and 0 deletions

View File

@ -181,7 +181,9 @@ class ElectingLevelDBStore extends ProxyLevelDBStore {
val zk_group = ZooKeeperGroupFactory.create(zk_client, zkPath)
val master_elector = new MasterElector(this)
debug("Starting ZooKeeper group monitor")
master_elector.start(zk_group)
debug("Joining ZooKeeper group")
master_elector.join
this.setUseLock(true)

View File

@ -90,6 +90,8 @@ class MasterElector(store: ElectingLevelDBStore) extends ClusteredSingleton[Leve
}
def changed:Unit = elector.synchronized {
debug("ZooKeeper group changed: %s", members)
// info(eid+" cluster state changed: "+members)
if (isMaster) {
// We are the master elector, we will choose which node will startup the MasterLevelDBStore