VictoriaMetrics/app/vmselect/promql
Zhu Jiekun 117b7ce6b7
bugfix: negative rate result when lookbehind window longer than search.maxLookback (#8378)
### Describe Your Changes

#8342 

fix negative rate result when the lookbehind window is longer than
`-search.maxLookback` or `-search.maxStalenessInterval` and data
contains gap.

This issue was introduced since
[v1.110.0](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/8072).

### Checklist

The following checks are **mandatory**:

- [x] My change adheres [VictoriaMetrics contributing
guidelines](https://docs.victoriametrics.com/contributing/).
2025-02-27 22:52:39 +01:00
..
active_queries.go all: consistently use stringsutil.JSONString() for formatting JSON strings with fmt.* functions instead of using "%q" formatter 2024-07-17 13:52:13 +02:00
aggr.go make: bump golangci-lint to v1.63.4 ( 2025-01-13 07:18:04 +01:00
aggr_incremental.go app/vmselect/promql/aggr_incremental.go: eliminate unnecessary memory allocation in incrementalAggrFuncContext.updateTimeseries 2024-01-23 02:28:30 +02: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: simplify the code after 388d020b7c 2024-01-16 15:06:33 +02:00
binary_op.go app/vmselect/promql: fix discrepancies when using or binary operator 2025-01-31 14:14:17 +01:00
eval.go app/select: add command-line flag -search.maxBinaryOpPushdownLabelValues 2025-01-03 13:20:50 +01:00
eval_test.go app: consistently use t.Fatal* instead of t.Error* (except of app/vmalert and app/vmctl - these packages will be processed in a separate commit) 2024-07-11 15:59:08 +02:00
exec.go app/vmselect/promql: improve performance of parseCache on systems with many CPU cores 2025-01-02 17:43:23 +01:00
exec_test.go app/vmselect/promql: fix discrepancies when using or binary operator 2025-01-31 14:14:17 +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
parse_cache.go app/vmselect/promql: improve performance of parseCache on systems with many CPU cores 2025-01-02 17:43:23 +01:00
parse_cache_test.go app/vmselect/promql: improve performance of parseCache on systems with many CPU cores 2025-01-02 17:43:23 +01:00
parse_cache_timing_test.go app/vmselect/promql: improve performance of parseCache on systems with many CPU cores 2025-01-02 17:43:23 +01:00
parser.go all: add support for or filters in series selectors 2023-07-16 00:06:33 -07:00
rollup.go bugfix: negative rate result when lookbehind window longer than search.maxLookback (#8378) 2025-02-27 22:52:39 +01:00
rollup_result_cache.go lib/slicesutil: add helper functions for setting slice length and extending its capacity 2024-05-12 11:32:17 +02:00
rollup_result_cache_test.go all: fix golangci-lint(revive) warnings after 0c0ed61ce7 2024-04-02 23:16:29 +03:00
rollup_test.go app/vmselect/promql: respect staleness in removeCounterResets (#8073) 2025-01-23 14:31:32 +01:00
rollup_timing_test.go app/vmselect: use consistent randomizer in tests 2023-01-23 19:27:25 -08:00
timeseries.go lib/slicesutil: add helper functions for setting slice length and extending its capacity 2024-05-12 11:32:17 +02:00
timeseries_test.go app/vmselect/promql: use unsafe.Slice instead of deprecated reflect.SliceHeader 2024-02-29 17:50:07 +02:00
transform.go app/vmselect/promql: consistently replace NaN data points with non-NaN values for range_first and range_last functions 2024-09-23 14:59:29 +02:00
transform_test.go app/vmseleсt/promql: fix calculation of histogram buckets 2024-08-15 10:11:41 +02: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