Bug 8206: Prevent decr follower next index beyong -1 80/54780/6
authorTom Pantelis <tompantelis@gmail.com>
Tue, 11 Apr 2017 13:39:49 +0000 (09:39 -0400)
committerTom Pantelis <tompantelis@gmail.com>
Fri, 14 Apr 2017 17:12:48 +0000 (17:12 +0000)
If a follower's next index is already -1, we shouldn't decrement it
further, ie -1 is the lowest allowed value. This can result in AbstractLeader
continuously decrementing and logging an info message while in the
process of sending an install snapshot.

member-3-shard-default-config (Leader): follower member-1-shard-default-config last log term 2 conflicts with the leader's 3 - dec next index to -2

Modified decrNextIndex to return a boolean if next index was decremented
which is checked  by AbstractLeader.

Change-Id: I29454d4e71a7f9128b3b47f6a4e3403615c2c8d2
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>

No differences found