]> git.kaiwu.me - haproxy.git/commit
MEDIUM: proxy: implement backend deletion
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 6 Jan 2026 14:26:13 +0000 (15:26 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 2 Mar 2026 13:14:05 +0000 (14:14 +0100)
commit712055f2f88cb776dd473980297ab227244a852b
tree9ada0a7df71b9ea78aed800a0b4ffb71674ea9ea
parent6145f52d9c57d6faf4a914fd79d0e4c987089349
MEDIUM: proxy: implement backend deletion

This patch finalizes "del backend" handler by implementing the proper
proxy deletion.

After ensuring backend deletion can be performed, several steps are
executed. First, any watcher elements are updated to point on the next
proxy instance. The backend is then removed from ID and name global
trees and is finally detached from proxies_list.

Once the backend instance is removed from proxies_list, the backend
cannot be found by new elements. Thread isolation is lifted and
proxy_drop() is called, which will purge the proxy if its refcount is
null. Thanks to recently introduced PROXIES_DEL_LOCK, proxy_drop() is
thread safe.
src/proxy.c