Bug 2187: Return OK reply after AddServer persist 53/29553/3
authorTom Pantelis <tpanteli@brocade.com>
Tue, 10 Nov 2015 12:06:42 +0000 (07:06 -0500)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 12 Nov 2015 01:59:09 +0000 (01:59 +0000)
commit72d2a44d009ca37696018d7aba3615ddd256560a
tree24e60cee051f6cbda4b307dd25dee6387794b6a5
parent5c3e3812eca4e7a06c69c376037578fae49828a2
Bug 2187: Return OK reply after AddServer persist

The AddServer processing was changed to return OK reply as soon as the
new ServerConfigurationPayload is persisted without waiting for
consensus. Prior, since the new server config is applied immediately in
the leader, if consensus wasn't reached, this would cause the
ShardManager on the calling side to delete new follower actor, resulting
in a "zombie" peer in the leader. Even if consensus isn't reached, the
new server config would've at least most likely been replicated to the
new follower and other down followers would eventually be replicated
when they come back up.

Change-Id: I425fa78d5dd023feda7913ed8d1b5b6c285ccae4
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorServerConfigurationSupport.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/MockRaftActorContext.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/RaftActorServerConfigurationSupportTest.java