Bug in AbstractLeader replication consensus 48/32848/5
authorGary Wu <gary.wu1@huawei.com>
Fri, 15 Jan 2016 19:31:48 +0000 (11:31 -0800)
committerGary Wu <gary.wu1@huawei.com>
Wed, 20 Jan 2016 17:34:00 +0000 (17:34 +0000)
commit1e8c4ac81392d39b2a9b37dcbedffc6bc6446446
tree8c02ca7a30b7b2dded8fd6014fa9af3ee2360878
parent38909c073135e7b36759f2627c16673c2561926b
Bug in AbstractLeader replication consensus

In determining whether to advance the commit index, only the voting
members should be counted in the replicatedCount.  There was a logic
error that instead caused it to be incorrectly based on whether the
AppendEntriesReply message as sent by a voting member.

This patch fixes the issue.

Change-Id: I6efb9574c39db608351297fc2552689d1ff77979
Signed-off-by: Gary Wu <gary.wu1@huawei.com>
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/AbstractLeader.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/LeaderTest.java