Bug 4850: Fix follower out-of-sync logic wrt replicatedToAllIndex 26/34826/1
authorTom Pantelis <tpanteli@brocade.com>
Wed, 30 Dec 2015 02:39:55 +0000 (21:39 -0500)
committerTom Pantelis <tpanteli@brocade.com>
Wed, 17 Feb 2016 12:52:51 +0000 (12:52 +0000)
commit957a699f85cc09b6fec9a048c6776b4d8d9d0d3b
tree22b80624c789836c6034b484be09b1b3415bae83
parent07ab62b31f45779a887c418b0bf8111c4fc94dbf
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>
(cherry picked from commit bb817d2b20a252f3acde329cba6ce98c592cd847)
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/Follower.java