diff --git a/app/vmselect/promql/rollup.go b/app/vmselect/promql/rollup.go index 5a2cde4be1..6099b58c83 100644 --- a/app/vmselect/promql/rollup.go +++ b/app/vmselect/promql/rollup.go @@ -234,7 +234,7 @@ func getMaxPrevInterval(timestamps []int64) int64 { return 1 } // Slightly increase d in order to handle possible jitter in scrape interval. - return d + (d / 8) + return d + (d / 4) } func removeCounterResets(values []float64) { diff --git a/app/vmselect/promql/rollup_test.go b/app/vmselect/promql/rollup_test.go index e5b621fb98..fdb79c8d37 100644 --- a/app/vmselect/promql/rollup_test.go +++ b/app/vmselect/promql/rollup_test.go @@ -454,7 +454,7 @@ func TestRollupWindowPartialPoints(t *testing.T) { } rc.Timestamps = getTimestamps(rc.Start, rc.End, rc.Step) values := rc.Do(nil, testValues, testTimestamps) - valuesExpected := []float64{44, 34, 34, nan} + valuesExpected := []float64{44, 34, 34, 34} timestampsExpected := []int64{100, 120, 140, 160} testRowsEqual(t, values, rc.Timestamps, valuesExpected, timestampsExpected) })