MINOR: server: add SRV_F_DELETED flag
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 24 Jan 2023 13:40:01 +0000 (14:40 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 5 Apr 2023 06:58:16 +0000 (08:58 +0200)
commit75b9d1c041c0c814f91b07b789ac997aa952a4b9
treef1a9ec54be43f737f23dd516da6487c6ad56f1b0
parent8019f78326993a50458a69534c5b29e1266cbb05
MINOR: server: add SRV_F_DELETED flag

Set the SRV_F_DELETED flag when server is removed from the cli.

When removing a server from the cli (in cli_parse_delete_server()),
we update the "visible" server list so that the removed server is no
longer part of the list.

However, despite the server being removed from "visible" server list,
one could still access the server data from a valid ptr (ie: srv_take())

Deleted flag helps detecting when a server is in transient removal
state: that is, removed from the list, thus not visible but not yet
purged from memory.
include/haproxy/server-t.h
src/server.c