Bug 1804: the condition was not working correctly to report leader 12/11212/1
authorHarman Singh <harmasin@cisco.com>
Mon, 15 Sep 2014 22:48:45 +0000 (15:48 -0700)
committerHarman Singh <harmasin@cisco.com>
Mon, 15 Sep 2014 22:50:01 +0000 (15:50 -0700)
Change-Id: Ie9b4d76f2cf623ecc17e17e3e64e6fe6a98c05be
Signed-off-by: Harman Singh <harmasin@cisco.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/Shard.java

index bf1eb05..f3f8b8b 100644 (file)
@@ -547,10 +547,6 @@ public class Shard extends RaftActor {
     }
 
     @Override protected void onLeaderChanged(String oldLeader, String newLeader) {
     }
 
     @Override protected void onLeaderChanged(String oldLeader, String newLeader) {
-        if((oldLeader == null && newLeader == null) || (newLeader != null && newLeader.equals(oldLeader)) ){
-            return;
-        }
-        LOG.info("Current state = {}, Leader = {}", getRaftState().name(), newLeader);
         shardMBean.setLeader(newLeader);
     }
 
         shardMBean.setLeader(newLeader);
     }