mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-10 15:14:09 +00:00
Revert "app/vmselect/promql: properly handle Prometheus staleness marks in removeCounterResets functions"
This reverts commit 94dfcb6747a3b29a11d14e71bea21a2312bb6346. It is better to remove staleness marks (decimal.StaleNaN) before calling rollupConfig.Do, e.g. in preFunc
This commit is contained in:
parent
af4a306d7b
commit
6c4c54eaad
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue