Rename misnamed oldestSampleTimestamp variable.
This commit is contained in:
parent
a3a6434ea9
commit
991dc68d78
|
@ -562,7 +562,7 @@ func (l *LevelDBMetricPersistence) refreshHighWatermarks(groups map[model.Finger
|
||||||
key = &dto.Fingerprint{}
|
key = &dto.Fingerprint{}
|
||||||
value = &dto.MetricHighWatermark{}
|
value = &dto.MetricHighWatermark{}
|
||||||
raw []byte
|
raw []byte
|
||||||
oldestSampleTimestamp = samples[len(samples)-1].Timestamp
|
newestSampleTimestamp = samples[len(samples)-1].Timestamp
|
||||||
keyEncoded = coding.NewProtocolBufferEncoder(key)
|
keyEncoded = coding.NewProtocolBufferEncoder(key)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -580,11 +580,11 @@ func (l *LevelDBMetricPersistence) refreshHighWatermarks(groups map[model.Finger
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if oldestSampleTimestamp.Before(time.Unix(*value.Timestamp, 0)) {
|
if newestSampleTimestamp.Before(time.Unix(*value.Timestamp, 0)) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
value.Timestamp = proto.Int64(oldestSampleTimestamp.Unix())
|
value.Timestamp = proto.Int64(newestSampleTimestamp.Unix())
|
||||||
batch.Put(keyEncoded, coding.NewProtocolBufferEncoder(value))
|
batch.Put(keyEncoded, coding.NewProtocolBufferEncoder(value))
|
||||||
mutationCount++
|
mutationCount++
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue