fix: not to fiddle node role immaturely

This commit is contained in:
Benguang Zhao 2023-06-25 17:18:58 +08:00
parent 92249d892a
commit e260e1a2e4
1 changed files with 2 additions and 0 deletions

View File

@ -1590,6 +1590,7 @@ void syncNodeDoConfigChange(SSyncNode* pSyncNode, SSyncCfg* pNewConfig, SyncInde
// persist cfg
syncWriteCfgFile(pSyncNode);
#if 0
// change isStandBy to normal (election timeout)
if (pSyncNode->state == TAOS_SYNC_STATE_LEADER) {
syncNodeBecomeLeader(pSyncNode, "");
@ -1601,6 +1602,7 @@ void syncNodeDoConfigChange(SSyncNode* pSyncNode, SSyncCfg* pNewConfig, SyncInde
} else {
syncNodeBecomeFollower(pSyncNode, "");
}
#endif
} else {
// persist cfg
syncWriteCfgFile(pSyncNode);