mirror of
https://github.com/haproxy/haproxy.git
synced 2026-03-07 15:51:23 -05:00
Implement refcount notion into proxy structure. The objective is to be able to increment refcount on proxy to prevent its deletion temporarily. This is similar to the server refcount : "del backend" is not blocked and will remove the targetted instance from the global proxies_list. However, the final free operation is delayed until the refcount is null. As stated above, the API is similar to servers. Proxies are initialized with a refcount of 1. Refcount can be incremented via proxy_take(). When no longer useful, refcount is decremented via proxy_drop() which replaces the older free_proxy(). Deinit is only performed once refcount is null. This commit also defines flag PR_FL_DELETED. It is set when a proxy instance has been removed via a "del backend" CLI command. This should serve as indication to modules which may still have a refcount on the target proxy so that they can release it as soon as possible. Note that this new refcount is completely ignored for a default proxy instance. For them, proxy_take() is pure noop. Free is immediately performed on first proxy_drop() invokation. |
||
|---|---|---|
| .. | ||
| haproxy | ||
| import | ||
| make | ||