]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: pools: do not maintain the lock during pool_flush()
authorWilly Tarreau <w@1wt.eu>
Thu, 10 Jun 2021 05:13:04 +0000 (07:13 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 10 Jun 2021 15:46:50 +0000 (17:46 +0200)
commitc88914379da35c46d093f6d410b9507355aacd0a
treea71cd21b2df7ecf6c0fc7c4bbaf70b82f3595917
parent9a7aa3b4a19e2117a2d31257388933f5fc0c6d4a
MINOR: pools: do not maintain the lock during pool_flush()

The locked version of pool_flush() is absurd, it locks the pool for each
and every element to be released till the end. Not only this is extremely
inefficient, but it may even never finish if other threads spend their
time refilling the pool. The only case where this can happen is during
soft-stop so the risk remains limited, but it should be addressed.
src/pool.c