Introduce a mechanism for a Follower to signal it's sync up status 54/15954/2
authorMoiz Raja <moraja@cisco.com>
Tue, 3 Mar 2015 03:49:41 +0000 (19:49 -0800)
committerMoiz Raja <moraja@cisco.com>
Tue, 3 Mar 2015 23:22:23 +0000 (15:22 -0800)
commit6eb0469b729fbe69dad58ce6223fc231669089c7
treec931b1ce35dc75c968805e8d8abcf63f9c90058f
parent61722bffcf885c04d11f684f2f03b09fa96f2002
Introduce a mechanism for a Follower to signal it's sync up status

This patch introduces a new message FollowerInitialSyncUpStatus. The
purpose of the message is to inform the RaftActor or a sub-class thereof
whether the Follower's commitIndex is now atleast at the same level
as the Leader was when it first sent a heartbeat to the Follower.

This will hopefully be useful in a rolling upgrade scenario where
we may have just brought up a new node and need to wait for it to be
synced with the current leader before we bring down and upgrade another
node in the cluster.

Change-Id: If19e4d98c2be708fc6a35823ca92cfac7ca87394
Signed-off-by: Moiz Raja <moraja@cisco.com>
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/FollowerInitialSyncUpStatus.java [new file with mode: 0644]
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/Follower.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/FollowerTest.java