修复在线扩容代码bug
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user