diff --git a/app/vmselect/promql/rollup.go b/app/vmselect/promql/rollup.go index 95f676475..6c999a93c 100644 --- a/app/vmselect/promql/rollup.go +++ b/app/vmselect/promql/rollup.go @@ -704,6 +704,8 @@ func getMaxPrevInterval(scrapeInterval int64) int64 { } func removeCounterResets(values []float64) { + // There is no need in handling NaNs here, since they are impossible + // on values from vmstorage. if len(values) == 0 { return } @@ -721,9 +723,7 @@ func removeCounterResets(values []float64) { } } prevValue = v - if !decimal.IsStaleNaN(v) { - values[i] = v + correction - } + values[i] = v + correction } }