]> git.kaiwu.me - haproxy.git/commit
MAJOR: peers: Stop to track acked updates per shared table
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 29 Sep 2025 13:48:18 +0000 (15:48 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 30 Oct 2025 13:17:49 +0000 (14:17 +0100)
commit5b6e29cacd6c863b6374280c77e2611be20c243d
tree505b7598cca8e67aa59a8e3ce946e4938f83273e
parente895761a46e2fa387b7ed919b848968cceaa9b82
MAJOR: peers: Stop to track acked updates per shared table

This patch is quite small but the change is really important. Thanks to the
previous patch, we can use PEER_F_SYNCHED flag to know if a peer is
synchronized or not. So instead of tracking last ack messages for each table
to be able to restart at a given point when the peer reconnects, we decided
to restart from the begining if a peer is not synchronized when a new
connection is established.

So, it is a huge change because, on reconnect, instead of pushing some
missed updates, all local updates are pushed again. Most of time, it is not
a problem because nowadays, connection are quite stable, especially because
a heartbeat message is sent to keep it active. The only drawback is when a
peer is restarted. In that case, we have no way to know it is synchronized
because he learned table contents from it old local peer.

This change is mandatory. First to replace the update tree by a mt-list and
remove the update lock. Then to split this list by buckets to reduce
contention.
include/haproxy/peers-t.h
src/peers.c