mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
parent
9775ad4754
commit
3d12906286
|
@ -86,11 +86,12 @@ func (p *persistence) recoverFromCrash(fingerprintToSeries map[model.Fingerprint
|
||||||
for fp, s := range fingerprintToSeries {
|
for fp, s := range fingerprintToSeries {
|
||||||
if _, seen := fpsSeen[fp]; !seen {
|
if _, seen := fpsSeen[fp]; !seen {
|
||||||
// fp exists in fingerprintToSeries, but has no representation on disk.
|
// fp exists in fingerprintToSeries, but has no representation on disk.
|
||||||
if s.persistWatermark == len(s.chunkDescs) {
|
if s.persistWatermark >= len(s.chunkDescs) {
|
||||||
// Oops, everything including the head chunk was
|
// Oops, everything including the head chunk was
|
||||||
// already persisted, but nothing on disk.
|
// already persisted, but nothing on disk. Or
|
||||||
// Thus, we lost that series completely. Clean
|
// the persistWatermark is plainly wrong. Thus,
|
||||||
// up the remnants.
|
// we lost that series completely. Clean up the
|
||||||
|
// remnants.
|
||||||
delete(fingerprintToSeries, fp)
|
delete(fingerprintToSeries, fp)
|
||||||
if err := p.purgeArchivedMetric(fp); err != nil {
|
if err := p.purgeArchivedMetric(fp); err != nil {
|
||||||
// Purging the archived metric didn't work, so try
|
// Purging the archived metric didn't work, so try
|
||||||
|
|
Loading…
Reference in a new issue