]> 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>
Fri, 17 Oct 2025 14:38:53 +0000 (16:38 +0200)
commit1cd4bd888060e2b755d3d90634cc0d036c9d8d1a
tree9b99377836d223b0e9742a57b168379c23ab5f1e
parent9babc988dafc1b5534c47b3742d6a2314c732f93
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