diff --git a/server/raft.go b/server/raft.go index 62995f717fb..80db17b639a 100644 --- a/server/raft.go +++ b/server/raft.go @@ -946,14 +946,16 @@ func (n *raft) Applied(index uint64) (entries uint64, bytes uint64) { } // Ignore if already applied. - if index > n.applied { - n.applied = index - } else { - assert.Unreachable("New applied is equal or lower than existing applied index", map[string]any{ + assert.Always( + index > n.applied, + "New applied is equal or lower than existing applied index", + map[string]any{ "new_applied_index": index, "applied_index": n.applied, - }) - + }, + ) + if index > n.applied { + n.applied = index } // Calculate the number of entries and estimate the byte size that