From fcd6f73f0e6cb3a026c0ffa4b65a138b1586e330 Mon Sep 17 00:00:00 2001 From: Emeric Brun Date: Wed, 28 Apr 2021 09:49:33 +0200 Subject: [PATCH] BUG/MEDIUM: peers: register last acked value as origin receiving a resync req Receiving a resync request, the origins to start the full sync and to reset after the full resync are mistakenly computed based on the last update on the table instead of computed based on the the last update acked by the node requesting the resync. It could result in disordered or missing updates pushing to the requester This patch sets correctly those origins. This patch should be backported on all supported branches ( >= 1.6 ) (cherry picked from commit 437e48ad9244eaea63881b6c8a86a380c4eecc23) Signed-off-by: Christopher Faulet (cherry picked from commit eb2f8e0c27308c6a56f59ff00c2a2232e980ebca) Signed-off-by: Christopher Faulet (cherry picked from commit 165d7a358c4d8cb59e7a82ca798ecca06eb82292) Signed-off-by: Christopher Faulet --- src/peers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/peers.c b/src/peers.c index 90d7e4b..f68185e 100644 --- a/src/peers.c +++ b/src/peers.c @@ -1814,7 +1814,7 @@ static inline int peer_treat_awaited_msg(struct appctx *appctx, struct peer *pee /* prepare tables fot a global push */ for (st = peer->tables; st; st = st->next) { - st->teaching_origin = st->last_pushed = st->table->update; + st->teaching_origin = st->last_pushed = st->update; st->flags = 0; } -- 1.7.10.4