]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: cache: fix "show cache" output
authorWilly Tarreau <w@1wt.eu>
Wed, 4 Apr 2018 09:56:43 +0000 (11:56 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 4 Apr 2018 09:56:43 +0000 (11:56 +0200)
commitafe1de5d98f2f4eb3d1fa495f090a1f99551d61a
treeb418fa621a8f440561150faf8b86085e38b25825
parentb797ae1f15b0fb97d1ae8550d37c3fd58a24f5b3
BUG/MINOR: cache: fix "show cache" output

The "show cache" command used to dump the header for each entry into into
the handler loop, making it repeated every ~16kB of output data. Additionally
chunk_appendf() was used instead of chunk_printf(), causing the output to
repeat already emitted lines, and the output size to grow in O(n^2). It used
to take several minutes to report tens of millions of objects from a small
cache containing only a few thousands. There was no more impact though.

This fix must be backported to 1.8.
src/cache.c