Skip to content

Commit

Permalink
Fix watermarker default time / LevelDB key ordering bug.
Browse files Browse the repository at this point in the history
This fixes part 2) of #367
(uninitialized time.Time mapping to a higher LevelDB key than "normal"
timestamps).

Change-Id: Ib079974110a7b7c4757948f81fc47d3d29ae43c9
  • Loading branch information
juliusv committed Oct 21, 2013
1 parent a1a97ed commit b5f6e3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions storage/metric/watermark.go
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b5f6e3c

Please sign in to comment.