mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +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
73d7b568da
commit
25997a70f1
1 changed files with 3 additions and 3 deletions
|
@ -704,6 +704,8 @@ func getMaxPrevInterval(scrapeInterval int64) int64 {
|
||||||
}
|
}
|
||||||
|
|
||||||
func removeCounterResets(values []float64) {
|
func removeCounterResets(values []float64) {
|
||||||
|
// There is no need in handling NaNs here, since they are impossible
|
||||||
|
// on values from vmstorage.
|
||||||
if len(values) == 0 {
|
if len(values) == 0 {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -721,11 +723,9 @@ func removeCounterResets(values []float64) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
prevValue = v
|
prevValue = v
|
||||||
if !decimal.IsStaleNaN(v) {
|
|
||||||
values[i] = v + correction
|
values[i] = v + correction
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
func deltaValues(values []float64) {
|
func deltaValues(values []float64) {
|
||||||
// There is no need in handling NaNs here, since they are impossible
|
// There is no need in handling NaNs here, since they are impossible
|
||||||
|
|
Loading…
Reference in a new issue