]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: hlua: assume proxy_find_by_id() may return NULL on previously existing...
authorAurelien DARRAGON <adarragon@haproxy.com>
Wed, 7 Oct 2026 10:43:35 +0000 (12:43 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Mon, 12 Oct 2026 07:38:11 +0000 (09:38 +0200)
commite7bd9ea3628249f92a30679287d65d7ecdf18785
tree21ea892a1e1e6a857ff221150d5efcbd0f168dfb
parenta8639b910f3bfbfd21456ea35811ec83d5c4d867
BUG/MINOR: hlua: assume proxy_find_by_id() may return NULL on previously existing server

Since 3.4 and dynamic backends, we may hit a race were a backend which
existed at the time the event was published does not exist anymore when
the event is processed. Previously it was assumed the proxy referenced
by a server event would always exist (since proxies couldn't be removed
dynamically), and a BUG_ON() ensured that. But it is not true anymore,
thus we need to check for proxy_find_by_id() NULL return value, which
indicates that the proxy was removed since, and thus it is not worth
looking for the server which triggered the event anyway.

It should be backported to 3.4.
src/hlua.c