app/vmselect: substitute inf values at smooth_exponential with the previous values

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/757
This commit is contained in:
Aliaksandr Valialkin 2020-09-11 12:23:33 +03:00
parent 6c80ae0da8
commit 2114179e19

View file

@ -1043,7 +1043,11 @@ func transformSmoothExponential(tfa *transformFuncArg) ([]*timeseries, error) {
values = values[1:]
sfsX := sfs[len(ts.Values)-len(values):]
for i, v := range values {
if math.IsNaN(v) || math.IsInf(v, 0) {
if math.IsNaN(v) {
continue
}
if math.IsInf(v, 0) {
values[i] = avg
continue
}
sf := sfsX[i]