]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: mworker: simplify the code that sets PROC_O_LEAVING
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Wed, 2 Oct 2024 09:38:30 +0000 (11:38 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 16 Oct 2024 20:02:39 +0000 (22:02 +0200)
commit154848a314e017c2c1ea5652d13553773631170c
tree0c0f2a3bde78f48ae76c1fba67ca65d04aec3e20
parentc8aac63893e2b96f51e74d0af69a6760b9874cfe
MINOR: mworker: simplify the code that sets PROC_O_LEAVING

When master performs a reexec it should set for an already existed worker the
flag PROC_O_LEAVING. It means that existed worked is marked as the previous one
and will be terminated after the reload.

In the previous implementation master process was need to do the reexec
twice (the first time for parsing its configuration and the second time to free
unused ressources). So the logic of setting PROC_O_LEAVING was based on
comparing the number of reloads, performed by each process from the processes
list, except the master.

Now, as being mentioned before, reexec is performed only once. So, in this case
we need to set PROC_O_LEAVING flag, when we deserialize the list. It is done for
all processes, which have the number of reloads stricly positive.
src/haproxy.c
src/mworker.c