]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: peers: Use atomic operations on peers flags when necessary
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 25 Apr 2024 08:51:18 +0000 (10:51 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 25 Apr 2024 16:29:58 +0000 (18:29 +0200)
commitfff5f63e1059a6aa82f2563f5bcd44cda8e09822
treea7f1a8098678cb2c5dd1bc48b56a476828b99448
parent608e23c495cfd77615690a92f3f05fa071ba05b2
BUG/MEDIUM: peers: Use atomic operations on peers flags when necessary

Peers flags are mainly used from the sync task. At least, it is only updated
by the sync task. However, there is one place where a peer may read these
flags, when the message marking the end of a synchro is sent.

So to be sure the value retrieved at this place is consistent, we must use
an atomic operation to read it. And of course, from the sync task, atomic
operations must be used to update peers flags. However, from the sync task,
there is no reason to use atomic operations to read flags because they
cannot be update from somewhere eles.
src/peers.c