BUG-2187: Non voting and Uninitialized followers are not to be counted towards consensus 54/28954/1
authorRajesh_Sindagi <Rajesh_Sindagi@dell.com>
Thu, 29 Oct 2015 15:23:35 +0000 (08:23 -0700)
committerRajesh_Sindagi <Rajesh_Sindagi@dell.com>
Thu, 29 Oct 2015 15:23:35 +0000 (08:23 -0700)
Change-Id: I1ba86cf2e2f904847ea8f819e84a3dc54fcc31d2
Signed-off-by: Rajesh_Sindagi <Rajesh_Sindagi@dell.com>
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/AbstractLeader.java

index 4ea02db2d7a9ed5db91cba9ee90ca7ac92b4e55f..b3644a7343c64606fbf5502dc49152113bce2e23 100644 (file)
@@ -254,7 +254,7 @@ public abstract class AbstractLeader extends AbstractRaftActorBehavior {
             int replicatedCount = 1;
 
             for (FollowerLogInformation info : followerToLog.values()) {
-                if (info.getMatchIndex() >= N) {
+                if ((info.getMatchIndex() >= N) && (context.getPeerInfo(followerId).isVoting())) {
                     replicatedCount++;
                 }
             }