]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: peers: trash of expired entries delayed after fullresync
authorEmeric Brun <ebrun@haproxy.com>
Fri, 10 Apr 2026 08:33:52 +0000 (10:33 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 15 Apr 2026 08:03:17 +0000 (10:03 +0200)
commit8f06c8fda4a60e248fedb5096c7978a8822ad455
tree021eb1b26e1a42e69e11c35dfc6ebb77b3a1e311
parent90e8ccd9c2a09d8b64a4a1a5fadb435768d96b2a
BUG/MEDIUM: peers: trash of expired entries delayed after fullresync

stksess_new has set the entry expire to the table expire delay,
if it is a new entry, set_entry inserts at that position in the expire
tree. There was a touch_remote updating the expire setting but the
tree's re-ordering is not designed to set back in the past resulting
to an entry that will be trashed only after a full table's expire delay
regardless the expire set on the stktsess.

This patch sets the newts expire before the call of 'set_entry'.
This way a new inserted entry is set directly at the right position
in the tree to trash the entry in time.

This patch should be backported on all supported branches and at
least v2.8
src/peers.c