Skip to content

Commit

Permalink
first error where the issue should be detected
Browse files Browse the repository at this point in the history
  • Loading branch information
whyrusleeping committed Nov 22, 2024
1 parent b6f34c7 commit f28d35d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions events/diskpersist.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ func (dp *DiskPersistence) resumeLog() error {
return fmt.Errorf("failed to scan log file for last seqno: %w", err)
}

if seq < lfr.SeqStart {
return fmt.Errorf("somehow the final sequence in the log is in the wrong range %d < %d", seq, lfr.SeqStart)
}

dp.curSeq = seq
dp.logfi = fi

Expand Down

0 comments on commit f28d35d

Please sign in to comment.