BUG/MEDIUM: peers: initialize resync timer to get an initial full resync
authorEmeric Brun <ebrun@haproxy.com>
Wed, 21 Apr 2021 14:06:35 +0000 (16:06 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 29 Apr 2021 09:12:07 +0000 (11:12 +0200)
commite63385e6ee12d9db184d9cba7446f54db39ffd9f
tree8a3b1e10f4285d95f6a65abbc9c888d034ded4f6
parent90bd47f7431cf662941ee75a6f774efb707c4b24
BUG/MEDIUM: peers: initialize resync timer to get an initial full resync

If a reload is performed and there is no incoming connections
from the old process to push a full resync, the new process
can be stuck waiting indefinitely for this conn and it never tries a
fallback requesting a full resync from a remote peer because the resync
timer was init to TICK_ETERNITY.

This patch forces a reset of the resync timer to default value (5 secs)
if we detect value is TICK_ETERNITY.

This patch should be backported on all supported branches ( >= 1.6 )

(cherry picked from commit 2c4ab4181601b1956095eb9b2c9d99984828ccf9)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 13eca443b4b38c15cd5ec990a4f22dcd6c606a1e)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit e2336e5d524d624f13e80309614d316aeac58df2)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/peers.c