[pgpool-committers: 4018] pgpool: Fixing a few corner cases in the failover request handling of t

Muhammad Usama m.usama at gmail.com
Thu May 11 03:04:09 JST 2017


Fixing a few corner cases in the failover request handling of the watchdog.

Watchdog keeps track of the failover requests it receives from the local and
remote Pgpool-II nodes, propagate that request to the whole cluster and trigger
the failover on local Pgpool-II. And while that failover is in progress it keep
denying the requests for similar failover (same failover kind and same
backend node) until it receives the finish failover intimation for that
failover from Pgpool-II.

But if due to some reason the failover end command is not received by watchdog,
that failover in progress status gets stuck in forever and watchdog keep
rejecting the similar failover requests until it is restarted.
To solve the failover stuck problem this commit adds the timeout to the
failover requests on watchdog side and automatically marks the failover as
finished if it does not receive the end failover intimation within
the timeout period.

Apart from above there was another issue, The functions for sending the failover
request to Pgpool-II main process had void return type and returns no indication
if the request was successfully registered or not. So that fix is also part of
the commit and now they return boolean value indicating the
request registration status.

Branch
------
V3_6_STABLE

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=c99e0fc001c7911e158d79478ae23871d4ac4f1b

Modified Files
--------------
src/include/pool.h      |   6 +-
src/main/pgpool_main.c  |  24 ++++----
src/watchdog/watchdog.c | 161 ++++++++++++++++++++++++++++++++++++------------
3 files changed, 139 insertions(+), 52 deletions(-)



More information about the pgpool-committers mailing list