Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion server/raft.go
Original file line number Diff line number Diff line change
Expand Up @@ -3272,8 +3272,9 @@ func (n *raft) truncateWAL(term, index uint64) {
if err := n.wal.Truncate(index); err != nil {
// If we get an invalid sequence, reset our wal all together.
// We will not have holes, so this means we do not have this message stored anymore.
// This is normal when truncating back to applied/snapshot.
if err == ErrInvalidSequence {
n.debug("Resetting WAL")
n.debug("Clearing WAL")
n.wal.Truncate(0)
// If our index is non-zero use PurgeEx to set us to the correct next index.
if index > 0 {
Expand Down
Loading