Browse Source

Merge pull request #3144 from wgliang/master

should use time.Since instead of time.Now().Sub
pull/3147/head
Fabian Reinartz 7 years ago committed by GitHub
parent
commit
6ab652e3dc
  1. 2
      storage/local/series.go

2
storage/local/series.go

@ -255,7 +255,7 @@ func (s *memorySeries) maybeCloseHeadChunk(timeout time.Duration) (bool, error)
if s.headChunkClosed {
return false, nil
}
if time.Now().Sub(s.lastTime.Time()) > timeout {
if time.Since(s.lastTime.Time()) > timeout {
s.headChunkClosed = true
// Since we cannot modify the head chunk from now on, we
// don't need to bother with cloning anymore.

Loading…
Cancel
Save