Fix unwanted recovery timeout in certain cases.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Tue, 12 Feb 2019 07:59:35 +0000 (16:59 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Tue, 12 Feb 2019 08:08:29 +0000 (17:08 +0900)
commitb04c9741adaa6bfedee077e4674d885c3f3678b4
tree9e0b004a1facbf53442e0fafbd39c362c021e585
parent279ee73a8a61ae32698f696664e7f9b9c4bf996a
Fix unwanted recovery timeout in certain cases.

In the second stage of online recovery in replication mode, it is
possible it fails with timeout (message: "wait_connection_closed:
existing connections did not close in %d sec.") if connection counter
is malformed by a child process aborts with SIGKILL, SEGFAULT or etc.
This could be detected by checking if client_idle_limit_in_recovery is
enabled and it has less value than recovery_timeout because all
clients must be kicked out by the time when
client_idle_limit_in_recovery is expired. If so, we should reset
conn_counter to 0 also.

Per bug 431.
src/pcp_con/recovery.c