mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 22:31:28 +02:00
BUG/MEDIUM: peers: reset commitupdate value in new conns
The commitupdate value of the table is used to check if the update is still pending for a push for all peers. To be sure to not miss a push we reset it just after a handshake success. This patch should be backported on all supported branches ( >= 1.6 )
This commit is contained in:
parent
d9729da982
commit
cc9cce9351
@ -2409,6 +2409,8 @@ 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;
|
||||||
|
if ((int)(st->last_pushed - st->table->commitupdate) > 0)
|
||||||
|
st->table->commitupdate = st->last_pushed;
|
||||||
HA_SPIN_UNLOCK(STK_TABLE_LOCK, &st->table->lock);
|
HA_SPIN_UNLOCK(STK_TABLE_LOCK, &st->table->lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2459,6 +2461,8 @@ 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;
|
||||||
|
if ((int)(st->last_pushed - st->table->commitupdate) > 0)
|
||||||
|
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…
x
Reference in New Issue
Block a user