prometheus/promql
David King 6286c10df0 Fix OOM when a large K is used in topk queries (#4087)
This attempts to close #3973.

Handles cases where the length of the input vector to an aggregate topk
/ bottomk function is less than the K paramater. The change updates
Prometheus to allocate a result vector the same length as the input
vector in these cases.

Previously Prometheus would out-of-memory panic for large K values. This
change makes that unlikely unless the size of the input vector is
equally large.

Signed-off-by: David King <dave@davbo.org>
2018-04-16 09:03:04 +01:00
..
fuzz-data textparse: Add fuzzing and fix bug caught 2017-07-07 11:12:17 +02:00
testdata Fix OOM when a large K is used in topk queries (#4087) 2018-04-16 09:03:04 +01:00
ast.go Expose itemtype outside the package (#3933) 2018-03-08 16:52:44 +00:00
bench_test.go Cleanup storage from all tests. 2018-03-09 07:53:35 +00:00
engine.go Fix OOM when a large K is used in topk queries (#4087) 2018-04-16 09:03:04 +01:00
engine_test.go promql: propagate storage errors 2018-03-14 15:19:22 +01:00
functions.go time() return milliseconds (#3811) 2018-02-08 11:39:13 +00:00
functions_test.go *: implement query params 2018-02-13 12:17:22 +01:00
fuzz.go textparse: Add fuzzing and fix bug caught 2017-07-07 11:12:17 +02:00
lex.go Expose itemtype outside the package (#3933) 2018-03-08 16:52:44 +00:00
lex_test.go Remove keep_common modifier. 2017-10-05 13:27:48 +01:00
parse.go Parser test cleanup (#3977) 2018-03-20 14:30:52 +00:00
parse_test.go Parser test cleanup (#3977) 2018-03-20 14:30:52 +00:00
printer.go promql: Make printer formatting less vintage (#3721) 2018-01-22 11:14:59 +01:00
printer_test.go promql: Make printer formatting less vintage (#3721) 2018-01-22 11:14:59 +01:00
promql_test.go
quantile.go Merge branch 'master' into dev-2.0 2017-04-27 10:19:55 +02:00
test.go Only show debug output on test failure 2018-03-09 07:53:35 +00:00
test_test.go Add _test.go suffix to promql/{bench.go, test.go} to prevent importing the testing package in a normal binary. 2017-07-07 15:52:44 +01:00
value.go Add license to files. 2017-04-19 13:46:22 +01:00