From b2ef4dc52d8166b4aea3348cc8fc5a7844a6e070 Mon Sep 17 00:00:00 2001 From: beorn7 Date: Thu, 19 May 2016 18:32:47 +0200 Subject: [PATCH] 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. --- storage/local/storage.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/local/storage.go b/storage/local/storage.go index 20a73748b4..85c50d0890 100644 --- a/storage/local/storage.go +++ b/storage/local/storage.go @@ -640,7 +640,7 @@ func (s *memorySeriesStorage) Append(sample *model.Sample) error { // (e.g. Pushgateway or federation). if sample.Timestamp == series.lastTime && series.lastSampleValueSet && - sample.Value == series.lastSampleValue { + sample.Value.Equal(series.lastSampleValue) { return nil } s.discardedSamplesCount.WithLabelValues(duplicateSample).Inc()