BUG/MINOR: peers: Wrong "new_conn" value for "show peers" CLI command.
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 18 Jan 2021 14:14:39 +0000 (15:14 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 19 Jan 2021 09:08:18 +0000 (10:08 +0100)
commit2b0ba54ddb7d555bd0116eb8278b37ac409e7779
tree6f6bf9c80114fd1c1a24b1524291d12fc688b962
parented84d84a2990ac49c23bf14e7c57b0ba11a287b8
BUG/MINOR: peers: Wrong "new_conn" value for "show peers" CLI command.

This counter could be hugely incremented by the peer task responsible of managing
peer synchronizations and reconnections, for instance when a peer is not reachable
there is a period where the appctx is not created. If we receive  stick-table
updates before the peer session (appctx) is instantiated, we reach the code
responsible of incrementing the "new_conn" counter.
With this patch we increment this counter only when we really instantiate a new
peer session thanks to peer_session_create().

May be backported as far as 2.0.
src/peers.c