BUG/MEDIUM: stick-tables: Make sure updates are seen as local

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.
This commit is contained in:
Olivier Houchard 2025-11-07 14:43:16 +00:00 committed by Olivier Houchard
parent 7d1787ba8e
commit c26bcfc1e3

View 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);
}