]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: peers: Only lock one peer at a time in the sync process function
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 22 Mar 2024 16:39:46 +0000 (17:39 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 16 Apr 2024 08:29:21 +0000 (10:29 +0200)
commit9075a7e32f68907897d759e2c96f933c517f5fa0
treed2defad8a827f1f11aceb2e81e0d84cf07ccb485
parent9425aeaffb128c31bc25581345dd7ae9958afbaf
MEDIUM: peers: Only lock one peer at a time in the sync process function

Thanks to all previous changes, it is now possible to stop locking all peers
at once in the resync process function. Peer are locked one after the
other. Wen a peer is locked, another one may be locked when all peer sharing
the same shard must be updated. Otherwise, at anytime, at most one peer is
locked. This should significantly improve the situation.

This patch depends on the following patchs:

 * BUG/MAJOR: peers: Update peers section state from a thread-safe manner
 * BUG/MINOR: peers: Report a resync was explicitly requested from a thread-safe manner
 * MINOR: peers: Add functions to commit peer changes from the resync task
 * MINOR: peers: sligthly adapt part processing the stopping signal
 * MINOR: peers: Add flags to report the peer state to the resync task
 * MINOR: peers: Add 2 peer flags about the peer learn status
 * MINOR: peers: Split resync process function to separate running/stopping states

It may be good to backport it to 2.9. All the seris should fix the issue #2470.
src/peers.c