]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: cache: free the blocks of aborted stores at once
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 25 Nov 2026 17:18:23 +0000 (18:18 +0100)
committerOlivier Houchard <cognet@ci0.org>
Wed, 25 Nov 2026 17:06:58 +0000 (18:06 +0100)
commit216f1e2bd0d818c3a37658394cd684eabf85f63d
tree6c978762ced38fa4f640f8548acf95e67cd69132
parent2626140532a72d30777b8bdc580cee9831b59cab
BUG/MINOR: cache: free the blocks of aborted stores at once

When a store is aborted, because the object turns out to be larger than
max-object-size or because the stream ends before the end of the
response, its row is reattached to the avail list still holding its
data, but it is in no LRU. With "early-hints on", once such a row
reaches the head of the list, cache_make_room() evicts a valid entry
instead, and the row stays there. These rows pile up and the cache
shrinks until no valid entry is left. Any client can cause this by
requesting such objects or by aborting.

Let's truncate these rows when they are reattached, so that their
blocks are free again immediately. This was introduced by commit
77c4de1ec ("MEDIUM: cache: early hints-aware eviction code") in
3.5-dev3, no backport is needed.
src/cache.c