mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-27 06:29:42 -08:00
Merge pull request #349 from prometheus/refactor/storage/componentize
Hot Fix: Use extracted time.
This commit is contained in:
commit
881e3fb6be
|
@ -328,19 +328,15 @@ func (t *TieredStorage) seriesTooOld(f *clientmodel.Fingerprint, i time.Time) (b
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
value := &dto.MetricHighWatermark{}
|
highTime, diskHit, err := t.DiskStorage.MetricHighWatermarks.Get(f)
|
||||||
k := &dto.Fingerprint{}
|
|
||||||
dumpFingerprint(k, f)
|
|
||||||
_, diskHit, err := t.DiskStorage.MetricHighWatermarks.Get(f)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if diskHit {
|
if diskHit {
|
||||||
wmTime := time.Unix(*value.Timestamp, 0).UTC()
|
t.wmCache.Set(f, &watermarks{High: highTime})
|
||||||
t.wmCache.Set(f, &watermarks{High: wmTime})
|
|
||||||
|
|
||||||
return wmTime.Before(i), nil
|
return highTime.Before(i), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
t.wmCache.Set(f, &watermarks{})
|
t.wmCache.Set(f, &watermarks{})
|
||||||
|
|
Loading…
Reference in a new issue