修复在线扩容代码bug

This commit is contained in:
薛蒙恩
2021-03-08 15:46:54 +08:00
committed by Gitee
parent c470eb8933
commit a19439e8b0

View File

@ -9496,14 +9496,16 @@ static void check_and_reset_ha_listen_port(void)
signal_child(g_instance.pid_cxt.RemoteServicePID, SIGTERM);
ListenSocketRegulation();
if (t_thrd.postmaster_cxt.HaShmData != NULL &&
t_thrd.postmaster_cxt.HaShmData->repl_list_num == 0 &&
t_thrd.postmaster_cxt.HaShmData->current_mode == PRIMARY_MODE) {
t_thrd.postmaster_cxt.HaShmData->current_mode = NORMAL_MODE;
SetServerMode(NORMAL_MODE);
}
}
#ifndef ENABLE_MULTIPLE_NODES
if (t_thrd.postmaster_cxt.HaShmData != NULL &&
t_thrd.postmaster_cxt.HaShmData->repl_list_num == 0 &&
t_thrd.postmaster_cxt.HaShmData->current_mode == PRIMARY_MODE) {
t_thrd.postmaster_cxt.HaShmData->current_mode = NORMAL_MODE;
SetServerMode(NORMAL_MODE);
}
#endif
return;
}