diff --git a/server/raft.go b/server/raft.go index e33d02d9272..5bf95ae4f0f 100644 --- a/server/raft.go +++ b/server/raft.go @@ -3265,8 +3265,11 @@ func (n *raft) processAppendEntry(ae *appendEntry, sub *subscription) { n.stepdownLocked(ae.leader) } } else if ae.term < n.term && !catchingUp && isNew { - n.debug("Ignoring AppendEntry from a leader (%s) with term %d which is less than ours", ae.leader, ae.term) + n.debug("Rejected AppendEntry from a leader (%s) with term %d which is less than ours", ae.leader, ae.term) + ar := newAppendEntryResponse(n.term, n.pindex, n.id, false) n.Unlock() + n.sendRPC(ae.reply, _EMPTY_, ar.encode(arbuf)) + arPool.Put(ar) return }