]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: stick-table: permit stksess_new() to temporarily allocate more entries
authorWilly Tarreau <w@1wt.eu>
Tue, 9 Sep 2025 14:39:08 +0000 (16:39 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 9 Sep 2025 15:56:37 +0000 (17:56 +0200)
commitb119280f602a2182d4ea03fafb43cc3c4ba01803
tree33c2169d390bf6559e50508af447b878c5ea2585
parent0f33a55171ede070d182df9e08b7293e543ca416
MINOR: stick-table: permit stksess_new() to temporarily allocate more entries

stksess_new() calls stktable_trash_oldest() to release some entries.
If it fails however, it will fail to allocate an entry. This is a problem
because it doesn't permit stktable_trash_oldest() to be used in best effort
mode, which forces it to impose high contention. There's no problem with
allocating slightly more in practice. In the worst case if all entries are
in use, it's not shocking to temporarily exceed the number of entries by a
few units.

Let's relax this problematic rule. This patch might need to be backported
to 3.2 after a bit more testing in order to support locking relaxation.
src/stick_table.c