Code Review: Swap ordering of elements.

This commit is contained in:
Matt T. Proud 2013-06-21 21:17:50 +02:00
parent 5daa0a09ea
commit ecb9c7bb9d
1 changed files with 1 additions and 1 deletions

View File

@ -314,7 +314,7 @@ func (t *TieredStorage) seriesTooOld(f *model.Fingerprint, i time.Time) (bool, e
if t.memoryArena.HasFingerprint(f) {
samples := t.memoryArena.CloneSamples(f)
if len(samples) > 0 {
newest := samples[0].Timestamp
newest := samples[len(samples)-1].Timestamp
t.wmCache.Set(f, &Watermarks{High: newest})
return newest.Before(i), nil