]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: cache/htx: Respect the reserve when cached objects are served
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 7 Jan 2019 13:07:29 +0000 (14:07 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 7 Jan 2019 15:32:07 +0000 (16:32 +0100)
commitcc156623b2ed80338e3ad460db3aba55605ac55f
treec29e4f876cf77929f5cd25445fd42e9d6a4da284
parent5811db004321def90f8aa8f8b17329b9afda3295
BUG/MEDIUM: cache/htx: Respect the reserve when cached objects are served

It is only true for HTX streams. The legacy code relies on ci_putblk() which is
already aware of the reserve. It is mandatory to not fill the reserve to let
other filters analysing data. It is especially true for the compression
filter. It needs at least 20 bytes of free space, plus at most 5 bytes per 32kB
block. So if the cache fully fills the channel's buffer, the compression will
not have enough space to do its job and it will block the data forwarding,
waiting for more free space. But if the buffer fully filled with input data (ie
no outgoing data), the stream will be frozen infinitely.

This patch must be backported to 1.9. It depends on the following patches:

  * BUG/MEDIUM: cache/htx: Respect the reserve when cached objects are served
    from the cache
  * MINOR: channel/htx: Add HTX version for some helper functions
src/cache.c