BUG/MEDIUM: queues: Make sure we call process_srv_queue() when leaving
authorOlivier Houchard <ohouchard@haproxy.com>
Fri, 13 Dec 2024 17:11:05 +0000 (17:11 +0000)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 9 Jan 2025 09:28:04 +0000 (10:28 +0100)
commit2de073ef00ee7d87aa82064dd2977645ec694730
tree2b48c8360e2f06de0ef6f829ce83ff8ea673c16d
parent8e1270fc407bd68221df8669c668c92e2dbcaa9d
BUG/MEDIUM: queues: Make sure we call process_srv_queue() when leaving

In stream_free(), make sure we call process_srv_queue() each time we
call sess_change_server(), otherwise a server may end up not dequeuing
any stream when it could do so. In some extreme cases it could lead to
an infinite loop, as the server would appear to be available, as its
"served" parameter would be < maxconn, but would end up not being used,
as there are elements still in its queue.

This should be backported up to 2.6.

(cherry picked from commit dc9ce9c26469e00ab71fe6387dbd13010d4930f0)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 1385e4ca16b3797b0091a959b626935cd7f29b38)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/stream.c