VictoriaMetrics/app/vmselect/promql
Aliaksandr Valialkin 2cbdb1db22
app/vmselect/promql: properly handle duplicate series when merging cached results with the results obtained from the database
evalRollupFuncNoCache() may return time series with identical labels (aka duplicate series)
when performing queries satisfying all the following conditions:

- It must select time series with multiple metric names. For example, {__name__=~"foo|bar"}
- The series selector must be wrapped into rollup function, which drops metric names. For example, rate({__name__=~"foo|bar"})
- The rollup function must be wrapped into aggregate function, which has no streaming optimization.
  For example, quantile(0.9, rate({__name__=~"foo|bar"})

In this case VictoriaMetrics shouldn't return `cannot merge series: duplicate series found` error.
Instead, it should fall back to query execution with disabled cache.

Also properly store the merged results. Previously they were incorrectly stored because of a typo
introduced in the commit 41a0fdaf39

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5332
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/pull/5337
2023-11-16 16:01:40 +01:00
..
active_queries.go Makefile: update golangci-lint from v1.51.2 to v1.54.2 2023-09-01 10:16:42 +02:00
aggr.go app/vmselect/promql: add outliers_iqr(q) and outlier_iqr_over_time(m[d]) functions 2023-10-31 22:10:31 +01:00
aggr_incremental.go app/vmselect/promql: optimize repeated SLI-like instant queries with lookbehind windows >= 1d 2023-10-31 19:25:23 +01:00
aggr_incremental_test.go app/vmselect/promql: fix TestIncrementalAggr test on systems less than 3 CPU cores 2023-03-20 20:37:18 -07:00
aggr_test.go app/vmselect/promql: add mode() aggregate function 2020-07-20 15:31:20 +03:00
binary_op.go app/vmselect: reduce lock contention for heavy aggregation requests (#5119) 2023-10-10 13:45:20 +02:00
eval.go app/vmselect/promql: properly handle duplicate series when merging cached results with the results obtained from the database 2023-11-16 16:01:40 +01:00
eval_test.go all: add support for or filters in series selectors 2023-07-16 00:06:33 -07:00
exec.go app/vmui: show query execution duration in the header of query input field 2023-11-01 16:43:51 +01:00
exec_test.go app/vmselect/promql: add outliers_iqr(q) and outlier_iqr_over_time(m[d]) functions 2023-10-31 22:10:31 +01:00
memory_limiter.go app/vmselect: return back the logic for limits the amounts of memory occupied by concurrently executed queries if -search.maxMemoryPerQuery isn't set 2022-10-10 21:45:13 +03:00
memory_limiter_test.go app/vmselect: return back the logic for limits the amounts of memory occupied by concurrently executed queries if -search.maxMemoryPerQuery isn't set 2022-10-10 21:45:13 +03:00
parser.go all: add support for or filters in series selectors 2023-07-16 00:06:33 -07:00
rollup.go fix: apply correct bounds to sf and tf (#5274) 2023-11-14 01:17:16 +01:00
rollup_result_cache.go app/vmselect/promql: properly handle duplicate series when merging cached results with the results obtained from the database 2023-11-16 16:01:40 +01:00
rollup_result_cache_test.go app/vmselect/promql: properly handle duplicate series when merging cached results with the results obtained from the database 2023-11-16 16:01:40 +01:00
rollup_test.go fix: apply correct bounds to sf and tf (#5274) 2023-11-14 01:17:16 +01:00
rollup_timing_test.go app/vmselect: use consistent randomizer in tests 2023-01-23 19:27:25 -08:00
timeseries.go app/vmselect/promql: optimize repeated SLI-like instant queries with lookbehind windows >= 1d 2023-10-31 19:25:23 +01:00
timeseries_test.go app/vmselect/promql: add test to ensure 8-byte alignment (#3948) 2023-03-16 09:01:42 -07:00
transform.go app/vmselect/promql: add labels_equal(q, "label1", "label2", ...) function 2023-10-16 21:50:11 +02:00
transform_test.go app/vmselect/promql: follow-up for 79e1c6a6fc 2023-03-27 18:03:36 -07:00
tzdata.go all: cleanup: remove // +build ... lines, since they are no longer needed after Go1.17, and the minimum supported Go version for VictoriaMetrics source code is Go1.20 2023-11-13 19:12:51 +01:00