mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-11 14:53:49 +00:00
38568254c5
* app/vmselect: ignore empty series for `limit_offset` VictoriaMetrics doesn't return empty series (with all NaN values) to the user. But such series are filtered after transform functions. It means `limit_offset` will account for empty series as well. For example, let's consider following data set: ``` time series: foo{label="1"} NaN, NaN, NaN, NaN // empty series foo{label="2"} 1, 2, 3, 4 foo{label="3"} 4, 3, 2, 1 ``` When user requests all series for metric `foo` the empty series will be filtered out: ``` /query=foo: foo{label="v2"} 1, 2, 3, 4 foo{label="v3"} 4, 3, 2, 1 ``` But `limit_offset(1, 1, foo)` is applied to original series, not filtered yet. So it will return `foo{label="v2"}` (skips the first in list) ``` /query=limit_offset(1, 1, foo): foo{label="v2"} 1, 2, 3, 4 ``` Expected result would be to apply `limit_offset` to already filtered list, so in result we receive `foo{label="v3"}`: ``` /query=limit_offset(1, 1, foo): foo{label="v3"} 4, 3, 2, 1 ``` The change does exactly that - filters empty series before applying `limit_offset`. Signed-off-by: hagen1778 <roman@victoriametrics.com> * app/vmselect: ignore empty series for `limit_offset` Signed-off-by: hagen1778 <roman@victoriametrics.com> Signed-off-by: hagen1778 <roman@victoriametrics.com> |
||
---|---|---|
.. | ||
active_queries.go | ||
aggr.go | ||
aggr_incremental.go | ||
aggr_incremental_test.go | ||
aggr_test.go | ||
binary_op.go | ||
eval.go | ||
eval_test.go | ||
exec.go | ||
exec_test.go | ||
memory_limiter.go | ||
memory_limiter_test.go | ||
parser.go | ||
rollup.go | ||
rollup_result_cache.go | ||
rollup_result_cache_test.go | ||
rollup_test.go | ||
rollup_timing_test.go | ||
timeseries.go | ||
timeseries_test.go | ||
transform.go | ||
transform_test.go | ||
tzdata.go |