From: Emeric Brun Date: Thu, 22 Apr 2021 16:13:13 +0000 (+0200) Subject: BUG/MINOR: peers: remove useless table check if initial resync is finished X-Git-Tag: v2.4-dev17~4 X-Git-Url: http://git.haproxy.org/?a=commitdiff_plain;h=1675ada4f4fda2dfc51c8bd1a4f24ec8513ae473;p=haproxy-2.5.git BUG/MINOR: peers: remove useless table check if initial resync is finished 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. --- diff --git a/src/peers.c b/src/peers.c index b7ea415..d8f0b74 100644 --- a/src/peers.c +++ b/src/peers.c @@ -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)