From 8a5d8c15e39e2f6af9392694c391578e052ca148 Mon Sep 17 00:00:00 2001 From: Ganesh Vernekar <15064823+codesome@users.noreply.github.com> Date: Wed, 25 Aug 2021 21:48:55 +0530 Subject: [PATCH] Do not replay checkpoint if it is covered by snapshot (#9226) Signed-off-by: Ganesh Vernekar --- tsdb/head.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsdb/head.go b/tsdb/head.go index 3c7ab291f..8872e0c79 100644 --- a/tsdb/head.go +++ b/tsdb/head.go @@ -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")