diff --git a/app/vmstorage/main.go b/app/vmstorage/main.go index ad471899d..aa28bbf21 100644 --- a/app/vmstorage/main.go +++ b/app/vmstorage/main.go @@ -526,7 +526,6 @@ func writeStorageMetrics(w io.Writer, strg *storage.Storage) { metrics.WriteCounterUint64(w, `vm_deduplicated_samples_total{type="merge"}`, m.DedupsDuringMerge) metrics.WriteGaugeUint64(w, `vm_snapshots`, m.SnapshotsCount) - metrics.WriteCounterUint64(w, `vm_rows_ignored_total{reason="nan_value"}`, m.NaNValueRows) metrics.WriteCounterUint64(w, `vm_rows_ignored_total{reason="big_timestamp"}`, m.TooBigTimestampRows) metrics.WriteCounterUint64(w, `vm_rows_ignored_total{reason="small_timestamp"}`, m.TooSmallTimestampRows) metrics.WriteCounterUint64(w, `vm_rows_ignored_total{reason="invalid_raw_metric_name"}`, m.InvalidRawMetricNames) diff --git a/lib/storage/storage.go b/lib/storage/storage.go index 46362a38a..85a05e4b3 100644 --- a/lib/storage/storage.go +++ b/lib/storage/storage.go @@ -42,7 +42,6 @@ const ( type Storage struct { rowsReceivedTotal atomic.Uint64 rowsAddedTotal atomic.Uint64 - naNValueRows atomic.Uint64 tooSmallTimestampRows atomic.Uint64 tooBigTimestampRows atomic.Uint64 @@ -490,7 +489,6 @@ type Metrics struct { DedupsDuringMerge uint64 SnapshotsCount uint64 - NaNValueRows uint64 TooSmallTimestampRows uint64 TooBigTimestampRows uint64 InvalidRawMetricNames uint64 @@ -566,7 +564,6 @@ func (s *Storage) UpdateMetrics(m *Metrics) { m.DedupsDuringMerge = dedupsDuringMerge.Load() m.SnapshotsCount += uint64(s.mustGetSnapshotsCount()) - m.NaNValueRows += s.naNValueRows.Load() m.TooSmallTimestampRows += s.tooSmallTimestampRows.Load() m.TooBigTimestampRows += s.tooBigTimestampRows.Load() m.InvalidRawMetricNames += s.invalidRawMetricNames.Load() @@ -1838,7 +1835,6 @@ func (s *Storage) add(rows []rawRow, dstMrs []*MetricRow, mrs []MetricRow, preci if !decimal.IsStaleNaN(mr.Value) { // Skip NaNs other than Prometheus staleness marker, since the underlying encoding // doesn't know how to work with them. - s.naNValueRows.Add(1) continue } } diff --git a/lib/storage/storage_test.go b/lib/storage/storage_test.go index 4396fcb43..5291bdb91 100644 --- a/lib/storage/storage_test.go +++ b/lib/storage/storage_test.go @@ -2,7 +2,6 @@ package storage import ( "fmt" - "math" "math/rand" "os" "path/filepath" @@ -1390,9 +1389,6 @@ func TestStorageRowsNotAdded(t *testing.T) { if got, want := gotMetrics.RowsAddedTotal, opts.wantMetrics.RowsAddedTotal; got != want { t.Fatalf("unexpected Metrics.RowsAddedTotal: got %d, want %d", got, want) } - if got, want := gotMetrics.NaNValueRows, opts.wantMetrics.NaNValueRows; got != want { - t.Fatalf("unexpected Metrics.NaNValueRows: got %d, want %d", got, want) - } if got, want := gotMetrics.InvalidRawMetricNames, opts.wantMetrics.InvalidRawMetricNames; got != want { t.Fatalf("unexpected Metrics.InvalidRawMetricNames: got %d, want %d", got, want) } @@ -1448,22 +1444,6 @@ func TestStorageRowsNotAdded(t *testing.T) { }, }) - minTimestamp = time.Now().UnixMilli() - maxTimestamp = minTimestamp + 1000 - mrs = testGenerateMetricRows(rng, numRows, minTimestamp, maxTimestamp) - for i := range numRows { - mrs[i].Value = math.NaN() - } - f(&options{ - name: "NaN", - mrs: mrs, - tr: TimeRange{minTimestamp, maxTimestamp}, - wantMetrics: &Metrics{ - RowsReceivedTotal: numRows, - NaNValueRows: numRows, - }, - }) - minTimestamp = time.Now().UnixMilli() maxTimestamp = minTimestamp + 1000 mrs = testGenerateMetricRows(rng, numRows, minTimestamp, maxTimestamp)