mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-09 08:37:04 +02:00
BUG/MEDIUM: peers: reset tables stage flags stages on new conns
Flags used as context to know current status of each table pushing a full resync to a peer were correctly reset receiving a new resync request or confirmation message but in case of local peer sync during reload the resync request is implicit and those flags were not correctly reset in this case. This could result to a partial initial resync of some tables after reload if the connection with the old process was broken and retried. This patch reset those flags at the end of the handshake for all new connections to be sure to push a entire full resync if needed. This patch should be backported on all supported branches ( v >= 1.6 )
This commit is contained in:
parent
8e7a13ed66
commit
1a6b43e13e
@ -2413,6 +2413,7 @@ static inline void init_accepted_peer(struct peer *peer, struct peers *peers)
|
|||||||
if ((int)(st->table->localupdate - st->update) < 0)
|
if ((int)(st->table->localupdate - st->update) < 0)
|
||||||
st->update = st->table->localupdate + (2147483648U);
|
st->update = st->table->localupdate + (2147483648U);
|
||||||
st->teaching_origin = st->last_pushed = st->update;
|
st->teaching_origin = st->last_pushed = st->update;
|
||||||
|
st->flags = 0;
|
||||||
if ((int)(st->last_pushed - st->table->commitupdate) > 0)
|
if ((int)(st->last_pushed - st->table->commitupdate) > 0)
|
||||||
st->table->commitupdate = st->last_pushed;
|
st->table->commitupdate = st->last_pushed;
|
||||||
HA_SPIN_UNLOCK(STK_TABLE_LOCK, &st->table->lock);
|
HA_SPIN_UNLOCK(STK_TABLE_LOCK, &st->table->lock);
|
||||||
@ -2465,6 +2466,7 @@ static inline void init_connected_peer(struct peer *peer, struct peers *peers)
|
|||||||
if ((int)(st->table->localupdate - st->update) < 0)
|
if ((int)(st->table->localupdate - st->update) < 0)
|
||||||
st->update = st->table->localupdate + (2147483648U);
|
st->update = st->table->localupdate + (2147483648U);
|
||||||
st->teaching_origin = st->last_pushed = st->update;
|
st->teaching_origin = st->last_pushed = st->update;
|
||||||
|
st->flags = 0;
|
||||||
if ((int)(st->last_pushed - st->table->commitupdate) > 0)
|
if ((int)(st->last_pushed - st->table->commitupdate) > 0)
|
||||||
st->table->commitupdate = st->last_pushed;
|
st->table->commitupdate = st->last_pushed;
|
||||||
HA_SPIN_UNLOCK(STK_TABLE_LOCK, &st->table->lock);
|
HA_SPIN_UNLOCK(STK_TABLE_LOCK, &st->table->lock);
|
||||||
|
Loading…
Reference in New Issue
Block a user