]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: stick-table: make sure never to miss a process_table_expire update
authorWilly Tarreau <w@1wt.eu>
Wed, 10 Sep 2025 16:45:01 +0000 (18:45 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 10 Sep 2025 16:45:01 +0000 (18:45 +0200)
commit2831cb104fa4cb528f27240a33ba84d27d7449b8
tree6b932e45ec93e680a41059ba06d39aede6ff9b39
parent2ce5e0edcce03d648a443c1f84307e3bdc7a2710
BUG/MINOR: stick-table: make sure never to miss a process_table_expire update

In stktable_requeue_exp(), there's a tiny race at the beginning during
which we check the task's expiration date to decide whether or not to
wake process_table_expire() up. During this race, the task might just
have finished running on its owner thread and we can miss a task_queue()
opportunity, which probably explains why during testing it seldom happens
that a few entries are left at the end.

Let's perform a CAS to confirm the value is still the same before
leaving. This way we're certain that our value has been seen at least
once.

This should be backported to 3.2.
src/stick_table.c