]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: peers: register last acked value as origin receiving a resync req
authorEmeric Brun <ebrun@haproxy.com>
Wed, 28 Apr 2021 07:49:33 +0000 (09:49 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 28 Apr 2021 12:23:10 +0000 (14:23 +0200)
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 )

src/peers.c

index 295b0eccf85ac9e8229cc22d6c932e3e83c4cde2..cff5696b826e5d3497182953106b39b81fa7bb35 100644 (file)
@@ -2068,7 +2068,7 @@ static inline int peer_treat_awaited_msg(struct appctx *appctx, struct peer *pee
                                    NULL, &msg_head[1], peers->local->id, peer->id);
                        /* prepare tables for 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;
                        }