Bug 3570: Use SnapShot lastAppliedIndex for install snapshot 68/22368/1
authorTom Pantelis <tpanteli@brocade.com>
Wed, 10 Jun 2015 06:17:21 +0000 (02:17 -0400)
committerMoiz Raja <moraja@cisco.com>
Thu, 11 Jun 2015 14:48:56 +0000 (14:48 +0000)
Follow-up patch for https://git.opendaylight.org/gerrit/#/c/21904/ to
use the captured Snapshot's lastAppliedIndex for the lastIncludedIndex
field in the InstallSnapshot message and the follower's matchIndex/nextIndex
once the install completes. This is in lieu of using the leader's snapshotIndex
which typically lags behind the lastAppliedIndex by 1 due to the trimming of
the in-memory log. This avoids the leader sending its last log entry
redundantly after the install completes as the last entry was included
in the snapshot.

Change-Id: Ie821078b4316641b67e1b853b9264353dde6bfae
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
(cherry picked from commit 1dfb0b9105e9eb352ff2263434e79a5433e59e91)


No differences found