WIP/MEDIUM: stick-tables: Inc the session's ref_cnt when it is in the pend_updt list

This commit is contained in:
Christopher Faulet 2025-11-18 11:51:58 +01:00
parent 02180d39f1
commit 2a1e55fe47

View File

@ -642,8 +642,10 @@ void stktable_touch_with_exp(struct stktable *t, struct stksess *ts, int local,
} }
if (did_append) if (did_append) {
HA_ATOMIC_INC(&ts->ref_cnt);
tasklet_wakeup(t->updt_task); tasklet_wakeup(t->updt_task);
}
if (decrefcnt) if (decrefcnt)
HA_ATOMIC_DEC(&ts->ref_cnt); HA_ATOMIC_DEC(&ts->ref_cnt);
@ -877,6 +879,7 @@ struct task *stktable_add_pend_updates(struct task *t, void *ctx, unsigned int s
* it from the list, but before we inserted it into the tree * it from the list, but before we inserted it into the tree
*/ */
MT_LIST_INIT(&stksess->pend_updts); MT_LIST_INIT(&stksess->pend_updts);
HA_ATOMIC_DEC(&stksess->ref_cnt);
} }
HA_RWLOCK_WRUNLOCK(STK_TABLE_UPDT_LOCK, &table->updt_lock); HA_RWLOCK_WRUNLOCK(STK_TABLE_UPDT_LOCK, &table->updt_lock);