]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: init: do not call fork_poller() for non-forked processes
authorWilly Tarreau <w@1wt.eu>
Wed, 4 Dec 2024 14:58:49 +0000 (15:58 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Wed, 4 Dec 2024 18:46:42 +0000 (19:46 +0100)
commit8b16b725411d72d3bab184bcd0c0253dddeedeb1
tree875d8341aa8d1c5b2fffb32736e7a7bab1d6e2a4
parent70e4938aec671c5bd1d69fee4ca1c8eea9f72bd3
BUG/MINOR: init: do not call fork_poller() for non-forked processes

In 3.1-dev10, commit 8dd4efe42f ("MAJOR: mworker: move master-worker
fork in init()") made the fork_poller() code unconditional, while it
is only desirable for processes that have been forked from a parent
(standalone daemon mode) or from a master (master-worker mode). The
call can be expensive in some cases as it will create a new poller,
scan and try to migrate to it all existing FDs till the highest known
one. With very high numbers of FDs, this can take several seconds to
start.

This should be backported to 3.1.
src/haproxy.c