fix(sync) add multi mnodes
This commit is contained in:
parent
14c95a0b31
commit
1a22de765c
|
@ -363,9 +363,12 @@ int32_t syncNodeOnAppendEntriesCb(SSyncNode* ths, SyncAppendEntries* pMsg) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
ASSERT(hit == true);
|
||||
|
||||
SReConfigCbMeta cbMeta = {0};
|
||||
bool isDrop;
|
||||
|
||||
// I am in newConfig
|
||||
if (hit) {
|
||||
syncNodeUpdateConfig(ths, &newSyncCfg, &isDrop);
|
||||
|
||||
// change isStandBy to normal
|
||||
|
@ -382,9 +385,10 @@ int32_t syncNodeOnAppendEntriesCb(SSyncNode* ths, SyncAppendEntries* pMsg) {
|
|||
sInfo("==config change== 0x11 old:%s new:%s isDrop:%d \n", sOld, sNew, isDrop);
|
||||
taosMemoryFree(sOld);
|
||||
taosMemoryFree(sNew);
|
||||
}
|
||||
|
||||
// always call FpReConfigCb
|
||||
if (ths->pFsm->FpReConfigCb != NULL) {
|
||||
SReConfigCbMeta cbMeta = {0};
|
||||
cbMeta.code = 0;
|
||||
cbMeta.currentTerm = ths->pRaftStore->currentTerm;
|
||||
cbMeta.index = pEntry->index;
|
||||
|
|
|
@ -141,7 +141,10 @@ void syncMaybeAdvanceCommitIndex(SSyncNode* pSyncNode) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (pSyncNode->state == TAOS_SYNC_STATE_LEADER) {
|
||||
ASSERT(hit == true);
|
||||
}
|
||||
|
||||
bool isDrop;
|
||||
syncNodeUpdateConfig(pSyncNode, &newSyncCfg, &isDrop);
|
||||
|
|
Loading…
Reference in New Issue