Skip to content

Commit

Permalink
Do not replay checkpoint if it is covered by snapshot (#9226)
Browse files Browse the repository at this point in the history
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
  • Loading branch information
codesome committed Aug 25, 2021
1 parent 235e4f3 commit 8a5d8c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tsdb/head.go
Expand Up @@ -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")
Expand Down

0 comments on commit 8a5d8c1

Please sign in to comment.