mirror of https://github.com/prometheus/prometheus
Correctly identify no-op appends if the value is NaN
This requires an updating of the vendored commen.model package, which I will do once https://github.com/prometheus/common/pull/40 is merged.pull/1646/head
parent
d9394eb359
commit
b2ef4dc52d
|
@ -640,7 +640,7 @@ func (s *memorySeriesStorage) Append(sample *model.Sample) error {
|
||||||
// (e.g. Pushgateway or federation).
|
// (e.g. Pushgateway or federation).
|
||||||
if sample.Timestamp == series.lastTime &&
|
if sample.Timestamp == series.lastTime &&
|
||||||
series.lastSampleValueSet &&
|
series.lastSampleValueSet &&
|
||||||
sample.Value == series.lastSampleValue {
|
sample.Value.Equal(series.lastSampleValue) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
s.discardedSamplesCount.WithLabelValues(duplicateSample).Inc()
|
s.discardedSamplesCount.WithLabelValues(duplicateSample).Inc()
|
||||||
|
|
Loading…
Reference in New Issue