]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: tasks: only requeue a task if it was already in the queue
authorWilly Tarreau <w@1wt.eu>
Wed, 11 Dec 2019 08:11:58 +0000 (09:11 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 11 Dec 2019 08:21:36 +0000 (09:21 +0100)
commit440d09b2448fcddea6877054300a95ba5b55dac7
treeda0e98933c833a661f10e372d431e5503d1f61c0
parent4ac36d691ab40a29ec4a1fb43a3270f31114feda
BUG/MINOR: tasks: only requeue a task if it was already in the queue

Commit 0742c314c3 ("BUG/MEDIUM: tasks: Make sure we switch wait queues
in task_set_affinity().") had a slight side effect on expired timeouts,
which is that when used before a timeout is updated, it will cause an
existing task to be requeued earlier than its expected timeout when done
before being updated, resulting in the next poll wakup timeout too early
or even instantly if the previous wake up was done on a timeout. This is
visible in strace when health checks are enabled because there are two
poll calls, one of which has a short or zero delay. The correct solution
is to only requeue a task if it was already in the queue.

This can be backported to all branches having the fix above.
include/proto/task.h