]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: peers: drop then re-acquire the wrlock in peer_send_teachmsgs()
authorWilly Tarreau <w@1wt.eu>
Fri, 28 Jul 2023 14:03:27 +0000 (14:03 +0000)
committerWilly Tarreau <w@1wt.eu>
Fri, 11 Aug 2023 17:03:35 +0000 (19:03 +0200)
commitd4f8286e45618fa1017c79e32950487f1d1ad4d4
tree3298453c12c61fa6349a4c4c5792441cfb4a8dfc
parent4eddf26f58ee2602385b5e7d3b626cd9977bd480
MEDIUM: peers: drop then re-acquire the wrlock in peer_send_teachmsgs()

This function maintains the write lock for a while. In practice it does
not need to hold it that long, and some parts could be performed under a
read lock. This patch first drops then re-acquires the write lock at the
function's entry. The purpose is simply to break the end-to-end atomicity
to prove that it has no impact in case something needs to be bisected
later. In fact the write lock is already dropped while calling
peer_send_updatemsg().
src/peers.c