]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: threads/lb: Make LB algorithms (lb_*.c) thread-safe
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 9 Jun 2017 12:17:53 +0000 (14:17 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 Oct 2017 12:58:31 +0000 (13:58 +0100)
commit5b51755aefd1dfed507772fdd13fae1ce572c2bd
tree77f94150b195de1ed5d546552e353435a38e3414
parent5d42e099c565c8002cf0f6fd0f29e3e6fbfdc723
MEDIUM: threads/lb: Make LB algorithms (lb_*.c) thread-safe

A lock for LB parameters has been added inside the proxy structure and atomic
operations have been used to update server variables releated to lb.

The only significant change is about lb_map. Because the servers status are
updated in the sync-point, we can call recalc_server_map function synchronously
in map_set_server_status_up/down function.
12 files changed:
include/common/hathreads.h
include/proto/lb_map.h
include/types/backend.h
include/types/lb_map.h
src/backend.c
src/cfgparse.c
src/haproxy.c
src/lb_chash.c
src/lb_fas.c
src/lb_fwlc.c
src/lb_fwrr.c
src/lb_map.c