BUG 2185: Expand the scope of sync status to cover a slow follower 26/26426/2
authorMoiz Raja <moraja@cisco.com>
Sat, 22 Aug 2015 02:13:05 +0000 (19:13 -0700)
committerTom Pantelis <tpanteli@brocade.com>
Thu, 10 Sep 2015 14:41:34 +0000 (10:41 -0400)
commitbbc8a16efdc6bfa0d742b73af3374a33a12e2a1c
tree30865fecf2d34d5238958f84520adc314de17f17
parenta24dce8bd21fdf3452086e307d2b4ecaafb73e42
BUG 2185: Expand the scope of sync status to cover a slow follower

Previously sync status was used only in the startup scenario
to make the controller appear to the external world as not
synced up unless it had received atleast data till the commitIndex
which the leader reported when it sent the follower it's first
heartbeat.

Now we also track when a new update is sent from the Leader to the
Follower and if the Follower is behind the Leader by a threshold
(hardcoded for now) then we consider the Follower as out-of-sync

Also I added the member name in the ShardManager bean so that is another
place from which we can figure out on which node we are running.

Change-Id: I1ba02575a0a1ac5d601af559f41971f2f5736f9d
Signed-off-by: Moiz Raja <moraja@cisco.com>
(cherry picked from commit 47890ea59104fe349c5637d51a44d76f3571ce78)
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/Follower.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/SyncStatusTracker.java [new file with mode: 0644]
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/SyncStatusTrackerTest.java [new file with mode: 0644]
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardManager.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/jmx/mbeans/shardmanager/ShardManagerInfo.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/jmx/mbeans/shardmanager/ShardManagerInfoMBean.java

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.