]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: stick-tables: Make sure updates are seen as local master
authorOlivier Houchard <ohouchard@haproxy.com>
Fri, 7 Nov 2025 14:43:16 +0000 (14:43 +0000)
committerOlivier Houchard <cognet@ci0.org>
Fri, 7 Nov 2025 15:23:21 +0000 (16:23 +0100)
In stktable_touch_with_exp, if it is a local update, add it to the
pending update list even if it's already in the tree as a remote update,
otherwise it will never be communicated to other peers;
It used to work before 3.2 because of the ordering of operations, but
it's been broken by adding an extra step with the pending update list,
so we now have to explicitely check for that.

This should be backported to 3.2.

src/stick_table.c

index 06a91ea49fb7d229e53deadbceaac869dadc320e..c9faa56a8f344b0fbc00fb7d865bb1065b42480a 100644 (file)
@@ -638,7 +638,7 @@ void stktable_touch_with_exp(struct stktable *t, struct stksess *ts, int local,
                        /* Check if this entry is not in the tree or not
                         * scheduled for at least one peer.
                         */
-                       if (!ts->upd.node.leaf_p || _HA_ATOMIC_LOAD(&ts->seen)) {
+                       if (!ts->upd.node.leaf_p || _HA_ATOMIC_LOAD(&ts->seen) || !ts->updt_is_local) {
                                _HA_ATOMIC_STORE(&ts->updt_is_local, 1);
                                did_append = MT_LIST_TRY_APPEND(&t->pend_updts[tgid - 1], &ts->pend_updts);
                        }