From 0cd46f8762ecf0247f3359b8cdf1b91d9e3759ba Mon Sep 17 00:00:00 2001 From: Chris Marchbanks Date: Sat, 13 Jul 2019 11:10:44 -0600 Subject: [PATCH] Add logging during WAL replay Signed-off-by: Chris Marchbanks --- head.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/head.go b/head.go index 8f513b49d..6cdcc99ea 100644 --- a/head.go +++ b/head.go @@ -502,6 +502,7 @@ func (h *Head) Init(minValidTime int64) error { return nil } + level.Info(h.logger).Log("msg", "replaying WAL, this may take awhile") // Backfill the checkpoint first if it exists. dir, startFrom, err := LastCheckpoint(h.wal.Dir()) if err != nil && err != ErrNotFound { @@ -525,6 +526,7 @@ func (h *Head) Init(minValidTime int64) error { return errors.Wrap(err, "backfill checkpoint") } startFrom++ + level.Info(h.logger).Log("msg", "WAL checkpoint loaded") } // Find the last segment. @@ -548,6 +550,7 @@ func (h *Head) Init(minValidTime int64) error { if err != nil { return err } + level.Info(h.logger).Log("msg", "WAL segment loaded", "segment", i, "maxSegment", last) } return nil