Do not replay checkpoint if it is covered by snapshot (#9226)

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
pull/9118/head
Ganesh Vernekar 3 years ago committed by GitHub
parent 235e4f351b
commit 8a5d8c15e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -523,7 +523,7 @@ func (h *Head) Init(minValidTime int64) (err error) {
h.startWALReplayStatus(startFrom, endAt)
multiRef := map[uint64]uint64{}
if err == nil {
if err == nil && startFrom >= snapIdx {
sr, err := wal.NewSegmentsReader(dir)
if err != nil {
return errors.Wrap(err, "open checkpoint")

Loading…
Cancel
Save