mirror of https://github.com/prometheus/prometheus
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>pull/4091/head
parent
e7584ee345
commit
6286c10df0
Loading…
Reference in new issue