mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-23 06:06:54 +00:00
BUG/MEDIUM: peers: fix expire date wasn't updated if entry is modified remotely.
The stktable_touch_remote considers the expire field stored in the stksess struct. The expire field was updated on the a newly created stksess to store. But if the stksess with a same key is still present the expire was not updated. This patch postpones the update of the expire field of the stksess just before processing the "touch". These bug was introduced in commit: MEDIUM: threads/stick-tables: handle multithreads on stick tables. And the fix should be backported on 1.8.
This commit is contained in:
parent
a792a0aa93
commit
5548291395
@ -1195,9 +1195,7 @@ switchstate:
|
||||
newts = stksess_new(st->table, NULL);
|
||||
if (!newts)
|
||||
goto ignore_msg;
|
||||
/* Force expiratiion to remote date
|
||||
in case of first insert */
|
||||
newts->expire = tick_add(now_ms, expire);
|
||||
|
||||
if (st->table->type == SMP_T_STR) {
|
||||
unsigned int to_read, to_store;
|
||||
|
||||
@ -1351,6 +1349,9 @@ switchstate:
|
||||
}
|
||||
}
|
||||
|
||||
/* Force new expiration */
|
||||
ts->expire = tick_add(now_ms, expire);
|
||||
|
||||
HA_RWLOCK_WRUNLOCK(STK_SESS_LOCK, &ts->lock);
|
||||
stktable_touch_remote(st->table, ts, 1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user