prometheus/promql
Alan Protasio a15e884e7a
Prevent Prometheus from overallocating memory on subquery with large amount of steps. (#12734)
* change initial points slice size

Signed-off-by: Alan Protasio <alanprot@gmail.com>

* refactor on the steps calculation and moving the getXPoint/putXPoint method to the evaluator

Signed-off-by: Alan Protasio <alanprot@gmail.com>

* prevent potential panic

Signed-off-by: Alan Protasio <alanprot@gmail.com>

* Update promql/engine.go

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Alan Protasio <alanprot@gmail.com>

* Update promql/engine.go

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Alan Protasio <alanprot@gmail.com>

* Update promql/engine.go

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Alan Protasio <alanprot@gmail.com>

* Update promql/engine.go

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Alan Protasio <alanprot@gmail.com>

* Allocating slice with maximum size of 5k

Signed-off-by: Alan Protasio <alanprot@gmail.com>

* adding comments

Signed-off-by: Alan Protasio <alanprot@gmail.com>

---------

Signed-off-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
2023-09-25 20:15:41 +01:00
..
fuzz-data
parser Add warnings (and annotations) to PromQL query results (#12152) 2023-09-14 18:57:31 +02:00
testdata Unit tests for native histograms (#12668) 2023-08-25 23:35:42 +02:00
bench_test.go Add context argument to IndexReader.Postings (#12667) 2023-09-13 17:45:06 +02:00
engine_test.go Add warnings (and annotations) to PromQL query results (#12152) 2023-09-14 18:57:31 +02:00
engine.go Prevent Prometheus from overallocating memory on subquery with large amount of steps. (#12734) 2023-09-25 20:15:41 +01:00
functions_test.go Merge branch 'main' into linter/nilerr 2023-04-19 19:56:39 +02:00
functions.go Add warnings (and annotations) to PromQL query results (#12152) 2023-09-14 18:57:31 +02:00
fuzz_test.go error for invalid media type should not be completely swallowed (#10186) 2022-02-08 10:57:56 +01:00
fuzz.go textparse/scrape: Add option to scrape both classic and native histograms 2023-05-13 01:32:25 +02:00
promql_test.go promql: allow tests to be imported (#12050) 2023-08-18 20:48:59 +02:00
quantile.go Update exp package (#12650) 2023-09-21 22:53:51 +02:00
query_logger_test.go add Close for ActiveQueryTracker to close the file. 2023-04-14 14:43:23 +08:00
query_logger.go add Close for ActiveQueryTracker to close the file. 2023-04-14 14:43:23 +08:00
test_test.go Add context argument to Querier.Select (#12660) 2023-09-12 12:37:38 +02:00
test.go Add warnings (and annotations) to PromQL query results (#12152) 2023-09-14 18:57:31 +02:00
value_test.go Shortcut ContainsSameLabelset() (#11000) 2022-07-13 15:18:10 +05:30
value.go Add warnings (and annotations) to PromQL query results (#12152) 2023-09-14 18:57:31 +02:00