!153 双集群下支持backup_open,agent_backup_open参数reload生效

Merge pull request !153 from 张翱/master
This commit is contained in:
opengauss_bot 2023-09-26 02:04:04 +00:00 committed by Gitee
commit b4eaf9e9a2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 11 additions and 4 deletions

View File

@ -358,6 +358,9 @@ void ReloadParametersFromConfig()
}
g_doradoClusterMode =
(DoradoClusterMode)get_uint32_value_from_config(configDir, "dorado_cluster_mode", SS_DORADO_NULL);
if (agent_backup_open == CLUSTER_OBS_STANDBY) {
agent_backup_open = (ClusterRole)get_uint32_value_from_config(configDir, "agent_backup_open", CLUSTER_PRIMARY);
}
log_threshold_check_interval =
get_uint32_value_from_config(configDir, "log_threshold_check_interval", log_threshold_check_interval);
undocumentedVersion = get_uint32_value_from_config(configDir, "upgrade_from", 0);
@ -410,7 +413,7 @@ void ReloadParametersFromConfigfile()
" enableLogCompress=%s, security_mode=%s, incremental_build=%d, unix_socket_directory=%s, "
#ifndef ENABLE_MULTIPLE_NODES
"enable_e2e_rto=%u, disaster_recovery_type=%d, environment_threshold=%s, "
"db_service_vip=%s, enable_fence_dn=%s, dorado_cluster_mode=%d\n",
"db_service_vip=%s, enable_fence_dn=%s, dorado_cluster_mode=%d, agent_backup_open=%d\n",
#else
"enable_e2e_rto=%u, disaster_recovery_type=%d, environment_threshold=%s\n",
#endif
@ -441,7 +444,8 @@ void ReloadParametersFromConfigfile()
g_environmentThreshold,
g_dbServiceVip,
g_enableFenceDn,
g_doradoClusterMode);
g_doradoClusterMode,
agent_backup_open);
#else
g_environmentThreshold);
#endif

View File

@ -355,6 +355,9 @@ static void ReloadParametersFromConfigfile()
GetTwoNodesArbitrateParams();
}
if (backup_open == CLUSTER_OBS_STANDBY) {
backup_open = (ClusterRole)get_int_value_from_config(configDir, "backup_open", 0);
}
#ifdef ENABLE_MULTIPLE_NODES
write_runlog(LOG,
@ -386,13 +389,13 @@ static void ReloadParametersFromConfigfile()
"datastorage_threshold_check_interval=%d,\n"
" max_datastorage_threshold_check=%d, enableSetReadOnly=%s, enableSetReadOnlyThreshold=%u, "
"switch_rto=%d, force_promote=%d, cluster_starting_aribt_delay=%u, enable_e2e_rto=%u, "
"g_delayArbiTime=%u, g_clusterArbiTime=%d, wait_static_primary_times=%u.\n",
"g_delayArbiTime=%u, g_clusterArbiTime=%d, wait_static_primary_times=%u, backup_open=%d.\n",
log_min_messages, maxLogFileSize, sys_log_path, g_alarmComponentPath, g_alarmReportInterval,
instance_heartbeat_timeout, g_ddbArbicfg.haHeartBeatTimeOut, cmserver_self_vote_timeout,
g_ddbArbicfg.haStatusInterval, cmserver_ha_connect_timeout, instance_failover_delay_timeout,
datastorage_threshold_check_interval, max_datastorage_threshold_check, g_enableSetReadOnly,
g_readOnlyThreshold, switch_rto, force_promote, g_clusterStartingArbitDelay,
g_enableE2ERto, g_delayArbiTime, g_clusterArbiTime, g_waitStaticPrimaryTimes);
g_enableE2ERto, g_delayArbiTime, g_clusterArbiTime, g_waitStaticPrimaryTimes, backup_open);
#endif
}