]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: peers: Wait for sync task ack when a resynchro is finished
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 24 Apr 2024 08:53:46 +0000 (10:53 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 25 Apr 2024 16:29:57 +0000 (18:29 +0200)
commite35293b2d3e0c7f3a923c7f2ab13062005c75a8b
tree85ec6924ba1f9229e73c9e35b9d939c237d054ab
parent12014587fa5685022eff8d81f8d5f966d28f17b8
BUG/MEDIUM: peers: Wait for sync task ack when a resynchro is finished

When a learning process is finished, partially or not, the event must be
processed by the sync task. It is important for the peer applet to wait in
this case, especially if the same peer is teaching to another peer, to be
sure to send the right resync finished message (full or partial).

Thanks to the previous patch, we can set PEER_F_WAIT_SYNCTASK_ACK flag on
the peer when a PEER_MSG_CTRL_RESYNCPARTIAL or PEER_MSG_CTRL_RESYNCFINISHED
message is received to be sure to stop the processing. Of course, we must
also take care to wake the peer up after having acknowledged the learn
status from the sync task.

This patch depends on the commit "BUG/MEDIUM: peers: Wait for sync task ack
when a resynchro is finished". Both must be backported if commit 9425aeaffb
("BUG/MAJOR: peers: Update peers section state from a thread-safe manner")
is backported.
src/peers.c