Fix bug of wd_no_show_node_removal_timeout.
authorBo Peng <pengbo@sraoss.co.jp>
Thu, 13 Jan 2022 06:00:26 +0000 (15:00 +0900)
committerBo Peng <pengbo@sraoss.co.jp>
Thu, 13 Jan 2022 06:02:08 +0000 (15:02 +0900)
Rename "wd_initial_node_showup_time" to "wd_no_show_node_removal_timeout".

src/config/pool_config_variables.c
src/include/pool_config.h
src/sample/pgpool.conf.sample-stream
src/watchdog/watchdog.c

index 6668050a2285c12998be074ff42f07ffec3d9036..1c33cf6c40e2ec59db83fb8c5500f2803bdd56ac 100644 (file)
@@ -2013,11 +2013,11 @@ static struct config_int ConfigureNamesInt[] =
                NULL, NULL, NULL
        },
        {
-               {"wd_initial_node_showup_time", CFGCXT_RELOAD, WATCHDOG_CONFIG,
+               {"wd_no_show_node_removal_timeout", CFGCXT_RELOAD, WATCHDOG_CONFIG,
                        "Timeout in seconds to revoke the cluster membership of NO-SHOW watchdog nodes.",
                        CONFIG_VAR_TYPE_INT, false, GUC_UNIT_S
                },
-               &g_pool_config.wd_initial_node_showup_time,
+               &g_pool_config.wd_no_show_node_removal_timeout,
                0,
                0, INT_MAX,
                NULL, NULL, NULL
index 3ec1b7abebcd38fe387209122d43506d3bdd9154..a372eed7f37c5cf770d8343a075b17ada8c3b781 100644 (file)
@@ -546,7 +546,7 @@ typedef struct
                                                                                        /* timeout in seconds to revoke membership of
                                                                                         * LOST watchdog nodes
                                                                                         */
-       int             wd_initial_node_showup_time;
+       int             wd_no_show_node_removal_timeout;
                                                                                        /* time in seconds to revoke membership of
                                                                                         * NO-SHOW watchdog node
                                                                                         */
index f8e42255754e20edbf4cc876d0ceb1d41286cb83..2a3cc752cf64017d64739aefebbe1138629b2a13 100644 (file)
@@ -765,7 +765,7 @@ hostname0 = ''
                                     # setting timeout to 0 will never revoke the membership
                                     # of LOST nodes
 
-#wd_initial_node_showup_time = 0s
+#wd_no_show_node_removal_timeout = 0s
                                     # Time to wait for Watchdog node to connect to the cluster.
                                     # After that time the cluster membership of NO-SHOW node gets
                                     # revoked and it does not count towards the quorum and
index 4603d18f332146fadb2fe7a30e5634c326f60d42..3d2c0544497a44aad57c6ac8b19126ee1076d0cc 100644 (file)
@@ -4786,10 +4786,10 @@ service_unreachable_nodes(void)
                }
 
                if (wdNode->state == WD_DEAD && wdNode->membership_status == WD_NODE_MEMBERSHIP_ACTIVE
-                       && pool_config->wd_initial_node_showup_time)
+                       && pool_config->wd_no_show_node_removal_timeout)
                {
                        int no_show_seconds = WD_TIME_DIFF_SEC(currTime, g_cluster.localNode->startup_time);
-                       if (no_show_seconds >= pool_config->wd_initial_node_showup_time)
+                       if (no_show_seconds >= pool_config->wd_no_show_node_removal_timeout)
                        {
                                ereport(LOG,
                                                (errmsg("remote node \"%s\" didn't showed-up in %d seconds", wdNode->nodeName,no_show_seconds),