VictoriaMetrics/app/vmselect
Roman Khavronenko b64b9b9fec
app/vmselect: ignore empty series for limit_offset (#3178)
* 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>
2022-09-30 08:20:34 +03:00
..
bufferedwriter app/vmselect/bufferedwriter: suppress trivial network errors, which can be generated by remote side 2022-03-18 19:28:02 +02:00
graphite lib/vmselectapi: pass maxSuffixes arg to tagValueSuffixes RPC call 2022-07-06 12:37:54 +03:00
graphiteql Graphite vmalert wip (#112) 2021-02-01 15:05:32 +02:00
netstorage all: remove the remaining bits of io/ioutil 2022-08-22 00:20:58 +03:00
prometheus vmselect/{promql, prometheus}: show flag names which user can update in error message (#3049) 2022-09-06 13:25:59 +03:00
promql app/vmselect: ignore empty series for limit_offset (#3178) 2022-09-30 08:20:34 +03:00
querystats app/vmselect: do not track queries with less than 1ms execution time at /api/v1/status/top_queries 2021-07-15 16:44:28 +03:00
searchutils all: make fmt via the upcoming Go1.19 2022-07-11 19:22:15 +03:00
vmui app/vmselect/vmui: make vmui-update after 1304824201 2022-09-14 13:33:06 +03:00
main.go app/vmselect: follow-up after 63e0f16062 2022-08-15 13:50:16 +03:00
README.md app/vmui: move source code from https://github.com/VictoriaMetrics/vmui to app/vmui 2021-07-09 17:15:23 +03:00

vmselect performs the incoming queries and fetches the required data from vmstorage.

The vmui directory contains static contents built from app/vmui package with make vmui-update command. The vmui page is available at http://<victoria-metrics>:8428/vmui/.