mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 06:04:05 -08:00
Adds an affirmative log message for successful WAL repair (#12135)
* Adds an affirmative log message for successful WAL repair Signed-off-by: Vernon Miller <vernon.miller@grafana.com> Signed-off-by: Vernon Miller <96601789+aldernero@users.noreply.github.com> Co-authored-by: Ganesh Vernekar <ganeshvern@gmail.com>
This commit is contained in:
parent
fd8992cdbd
commit
ca0abf26c5
|
@ -303,6 +303,7 @@ func Open(l log.Logger, reg prometheus.Registerer, rs *remote.Storage, dir strin
|
||||||
if err := w.Repair(err); err != nil {
|
if err := w.Repair(err); err != nil {
|
||||||
return nil, errors.Wrap(err, "repair corrupted WAL")
|
return nil, errors.Wrap(err, "repair corrupted WAL")
|
||||||
}
|
}
|
||||||
|
level.Info(db.logger).Log("msg", "successfully repaired WAL")
|
||||||
}
|
}
|
||||||
|
|
||||||
go db.run()
|
go db.run()
|
||||||
|
|
|
@ -828,11 +828,13 @@ func open(dir string, l log.Logger, r prometheus.Registerer, opts *Options, rngs
|
||||||
if err := wbl.Repair(initErr); err != nil {
|
if err := wbl.Repair(initErr); err != nil {
|
||||||
return nil, errors.Wrap(err, "repair corrupted OOO WAL")
|
return nil, errors.Wrap(err, "repair corrupted OOO WAL")
|
||||||
}
|
}
|
||||||
|
level.Info(db.logger).Log("msg", "Successfully repaired OOO WAL")
|
||||||
} else {
|
} else {
|
||||||
level.Warn(db.logger).Log("msg", "Encountered WAL read error, attempting repair", "err", initErr)
|
level.Warn(db.logger).Log("msg", "Encountered WAL read error, attempting repair", "err", initErr)
|
||||||
if err := wal.Repair(initErr); err != nil {
|
if err := wal.Repair(initErr); err != nil {
|
||||||
return nil, errors.Wrap(err, "repair corrupted WAL")
|
return nil, errors.Wrap(err, "repair corrupted WAL")
|
||||||
}
|
}
|
||||||
|
level.Info(db.logger).Log("msg", "Successfully repaired WAL")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue