]> git.kaiwu.me - haproxy.git/commit
MINOR: proxy: define purge task and purge servers list
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 17 Sep 2026 13:48:20 +0000 (15:48 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 14 Oct 2026 09:21:29 +0000 (11:21 +0200)
commit120834d7059671bbc3c1899d016e3f1cc713839b
treec81042775e5c1c2de74024252c5309d13bead5df
parentaa8e3eefa6077218f4c8d5359e046a266d8d0627
MINOR: proxy: define purge task and purge servers list

Add two new members in proxy type.

First, a task <purge_task> is added. It will be used as an internal task
to cleanup proxy related resources, i.e. its servers and the proxy
itself. The task is allocated only for non internal backend instances.
Handler proxy_process_purge() runs in thread isolation to prevent any
race conditions. This task may run on any thread, thus task_kill() is
used on proxy deinit to ensure runtime backend deletion is still safe.

Second, <servers_purge> is a new list member in proxy. This will contain
any server targeted for a background deletion. Purge task handler will
run itself every second until the list is empty.

For now, task handler is mostly empty and servers purge list is not
used. This will be extended when purge CLI commands for servers and
backends will be implemented.
include/haproxy/proxy-t.h
src/proxy.c