mirror of
https://github.com/prometheus/prometheus
synced 2024-12-27 00:53:12 +00:00
Fix watermarker default time / LevelDB key ordering bug.
This fixes part 2) of https://github.com/prometheus/prometheus/issues/367 (uninitialized time.Time mapping to a higher LevelDB key than "normal" timestamps). Change-Id: Ib079974110a7b7c4757948f81fc47d3d29ae43c9
This commit is contained in:
parent
a1a97ed064
commit
b5f6e3c90c
@ -67,7 +67,7 @@ func (w *LevelDBHighWatermarker) Get(f *clientmodel.Fingerprint) (t time.Time, o
|
||||
return t, ok, err
|
||||
}
|
||||
if !ok {
|
||||
return t, ok, nil
|
||||
return time.Unix(0, 0), ok, nil
|
||||
}
|
||||
t = time.Unix(v.GetTimestamp(), 0)
|
||||
return t, true, nil
|
||||
@ -183,7 +183,7 @@ func (w *LevelDBCurationRemarker) Get(c *curationKey) (t time.Time, ok bool, err
|
||||
|
||||
ok, err = w.p.Get(k, v)
|
||||
if err != nil || !ok {
|
||||
return t, ok, err
|
||||
return time.Unix(0, 0), ok, err
|
||||
}
|
||||
|
||||
return time.Unix(v.GetLastCompletionTimestamp(), 0).UTC(), true, nil
|
||||
|
Loading…
Reference in New Issue
Block a user