mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-25 14:28:20 +01:00
b64b9b9fec
* 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_incremental_test.go | ||
aggr_incremental.go | ||
aggr_test.go | ||
aggr.go | ||
binary_op.go | ||
eval_test.go | ||
eval.go | ||
exec_test.go | ||
exec.go | ||
memory_limiter_test.go | ||
memory_limiter.go | ||
parser.go | ||
rollup_result_cache_test.go | ||
rollup_result_cache.go | ||
rollup_test.go | ||
rollup_timing_test.go | ||
rollup.go | ||
timeseries_test.go | ||
timeseries.go | ||
transform_test.go | ||
transform.go | ||
tzdata.go |