]> 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>
Tue, 21 Oct 2025 13:04:11 +0000 (15:04 +0200)
commit4e181a2c26ed3254ed1b7bc4bef1135cbc55ec4a
treee148a1e4be9035af0b89d0b3ed025420fc48362a
parent94eae33f8e4fd01738b088e0624416daf8da4439
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