From: Tatsuo Ishii Date: Tue, 22 Jul 2025 07:48:45 +0000 (+0900) Subject: Add function comment to is_wd_lifecheck_ready. X-Git-Tag: V4_7_0_BETA1~69 X-Git-Url: http://waps.l3s.uni-hannover.de/gitweb/%20%22mailto:postgres95%40openlink.co.uk%22?a=commitdiff_plain;h=5d5bdc6333612f40259711c1074d7e374c066c95;p=pgpool2.git Add function comment to is_wd_lifecheck_ready. Also clarify a debug message. Previous it stated that the reason for the function returns WD_NG was that pgpool has not send hearbeat yet. Actually the reason could be that pgpool has not received hearbeat yet too. --- diff --git a/src/watchdog/wd_lifecheck.c b/src/watchdog/wd_lifecheck.c index b62a9b493..5830d82af 100644 --- a/src/watchdog/wd_lifecheck.c +++ b/src/watchdog/wd_lifecheck.c @@ -642,7 +642,14 @@ load_watchdog_nodes_from_json(char *json_data, int len) json_value_free(root); } - +/*---------- + * is_wd_lifecheck_ready + * + * Check all registered watchdog nodes and returns WD_OK if: + * query mode: wd_ping_pgpool returns WD_OK + * hearbeat mode: has received from and + * sent to all node the heartbeat message + */ static int is_wd_lifecheck_ready(void) { @@ -680,7 +687,7 @@ is_wd_lifecheck_ready(void) { ereport(DEBUG1, (errmsg("watchdog checking life check is ready"), - errdetail("pgpool:%d at \"%s:%d\" has not send the heartbeat signal yet", + errdetail("pgpool:%d at \"%s:%d\" has not received from or sent to the heartbeat signal yet", i, node->hostName, node->pgpoolPort))); rtn = WD_NG; }