mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 00:26:30 +00:00
De-overload configuration file parameter "standby_reconnect_timeout"
Currently the (very generic sounding) "standby_reconnect_timeout" configuration file parameter is used in several different contexts and it would be useful to have more granular control over the different timeouts it's used to configure. This patch introduces "node_rejoin_timeout", used in place of "standby_reconnect_timeout" (which wasn't documented) when "repmgr node rejoin" is executed, to determine how long to wait for the node to rejoin the replication cluster. Additionally "repmgrd_standby_startup_timeout" is introduced as a timeout for failover situations, when repmgrd executes "repmgr standby follow" to follow a new primary, and waits for the standby to restart and become available for connections. "standby_reconnect_timeout" is now only relevant for "repmgr standby switchover". Implements GitHub #454.
This commit is contained in:
@@ -2274,19 +2274,19 @@ do_node_rejoin(void)
|
||||
{
|
||||
log_verbose(LOG_INFO, _("waiting for node %i to respond to pings; %i of max %i attempts"),
|
||||
config_file_options.node_id,
|
||||
i + 1, config_file_options.standby_reconnect_timeout);
|
||||
i + 1, config_file_options.node_rejoin_timeout);
|
||||
}
|
||||
else
|
||||
{
|
||||
log_debug("sleeping 1 second waiting for node %i to respond to pings; %i of max %i attempts",
|
||||
config_file_options.node_id,
|
||||
i + 1, config_file_options.standby_reconnect_timeout);
|
||||
i + 1, config_file_options.node_rejoin_timeout);
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
for (; i < config_file_options.standby_reconnect_timeout; i++)
|
||||
for (; i < config_file_options.node_rejoin_timeout; i++)
|
||||
{
|
||||
success = is_downstream_node_attached(upstream_conn, config_file_options.node_name);
|
||||
|
||||
@@ -2301,13 +2301,13 @@ do_node_rejoin(void)
|
||||
{
|
||||
log_info(_("waiting for node %i to connect to new primary; %i of max %i attempts"),
|
||||
config_file_options.node_id,
|
||||
i + 1, config_file_options.standby_reconnect_timeout);
|
||||
i + 1, config_file_options.node_rejoin_timeout);
|
||||
}
|
||||
else
|
||||
{
|
||||
log_debug("sleeping 1 second waiting for node %i to connect to new primary; %i of max %i attempts",
|
||||
config_file_options.node_id,
|
||||
i + 1, config_file_options.standby_reconnect_timeout);
|
||||
i + 1, config_file_options.node_rejoin_timeout);
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
|
||||
Reference in New Issue
Block a user