]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: peers: remove useless table check if initial resync is finished
authorEmeric Brun <ebrun@haproxy.com>
Thu, 22 Apr 2021 16:13:13 +0000 (18:13 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 23 Apr 2021 16:03:06 +0000 (18:03 +0200)
The old process checked each table resync status even if
the resync process is finished. This behavior had no known impact
except useless processing and was discovered during debugging on
an other issue.

This patch could be backported in all supported branches (v >= 1.6)
but once again, it has no impact except avoid useless processing.

src/peers.c

index b7ea415d1fd61299c22ef81e0dca8a179946563d..d8f0b747591bc10322a3bcf38e3519f43bd1c803 100644 (file)
@@ -2223,7 +2223,7 @@ static inline int peer_send_msgs(struct appctx *appctx,
                                }
                                HA_SPIN_UNLOCK(STK_TABLE_LOCK, &st->table->lock);
                        }
-                       else {
+                       else if (!(peer->flags & PEER_F_TEACH_FINISHED)) {
                                if (!(st->flags & SHTABLE_F_TEACH_STAGE1)) {
                                        repl = peer_send_teach_stage1_msgs(appctx, peer, st);
                                        if (repl <= 0)