Off-by-one on RAFT pindex

This commit is contained in:
Neil Twigg
2023-02-20 18:16:10 +00:00
parent 5c6b3b620a
commit 20980dc324

View File

@@ -2873,7 +2873,7 @@ func (n *raft) processAppendEntry(ae *appendEntry, sub *subscription) {
if ae.pterm != n.pterm || ae.pindex != n.pindex {
// Check if this is a lower index than what we were expecting.
if ae.pindex < n.pindex {
if ae.pindex <= n.pindex {
n.debug("AppendEntry detected pindex less than ours: %d:%d vs %d:%d", ae.pterm, ae.pindex, n.pterm, n.pindex)
var ar *appendEntryResponse