Bug 4850: Fix follower out-of-sync logic wrt replicatedToAllIndex 68/31968/2
authorTom Pantelis <tpanteli@brocade.com>
Wed, 30 Dec 2015 02:39:55 +0000 (21:39 -0500)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 5 Jan 2016 01:39:30 +0000 (01:39 +0000)
commitbb817d2b20a252f3acde329cba6ce98c592cd847
treeddd6a360dbdcd4339c6d48d20d82d9026a957d1a
parent1f5efaae42410b857ef308923e0fe79b5917926c
Bug 4850: Fix follower out-of-sync logic wrt replicatedToAllIndex

If the AppendEntries prevLogIndex is -1 and replicatedToAllIndex != -1,
it flags the follower as out-of-sync if there's no log entry for
replicatedToAllIndex. However replicatedToAllIndex may be in the
snapshot so I added a check for that as well. This fixes the issue
described in bug 4850.

Change-Id: If499dadc5f2a3c3823d617e60410b0f63df389d7
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/Follower.java