]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: checks: do not queue/wake a bounced check
authorWilly Tarreau <w@1wt.eu>
Fri, 1 Sep 2023 05:41:46 +0000 (07:41 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 Sep 2023 06:26:06 +0000 (08:26 +0200)
commit48442b8b156b3d7b7e99cdeb6decc1314b3e286d
tree5513e5e0ff42061bed25ad0311574b18475ec757
parent338431ecb66ff78ea96c1304d6674a742590fc47
BUG/MINOR: checks: do not queue/wake a bounced check

A small issue was introduced with commit d114f4a68 ("MEDIUM: checks:
spread the checks load over random threads"): when a check is bounced
to another thread, its expiration time is set to TICK_ETERNITY. This
makes it show as not expired upon first wakeup on the next thread,
thus being detected as "woke up too early" and being instantly
rescheduled. Only this after this next wakeup it will be properly
considered.

Several approaches were attempted to fix this. The best one seems to
consist in resetting t->expire and expired upon wakeup, and changing
the !expired test for !tick_is_expired() so that we don't trigger on
this case.

This needs to be backported to 2.7.
src/check.c