]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MAJOR: peers: Replace the update tree by a list
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 22 Oct 2025 06:37:14 +0000 (08:37 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 30 Oct 2025 13:18:43 +0000 (14:18 +0100)
commit41dfd28da340fdabca5dc4038f987216ac08fb0e
treea60fa8bd0e0b0d8a7d9737f9580068dc74aa1be9
parent96fb2dd3fa7046ccb3cceed98c6dbfd84f3cca97
MAJOR: peers: Replace the update tree by a list

To be able to split updates by shard, the update tree was replaced by a
simple list. Indeed, by splitting the updates by shard, we loose the order
of updates. So there is no reason to still use a tree.

To make it work properly, instead of using the id of the last update pushed,
we use markers, special sticky session, only present in the updates list and
owned by a peer. There are two marker. The main one, <last>, is used as
restart point to send the new updates. The other one, <end>, is only used as
stop point when a resync was requested by a remote peer.

Thanks to these changed, the function responsible to loop on updates is a
littel simpler. We only loop frop <last> to the end of the list, or <end> if
found in the list.
include/haproxy/peers-t.h
include/haproxy/stick_table-t.h
src/peers.c
src/stick_table.c