enh: terminate on incompletenss of fsm state for dbs of single replica
This commit is contained in:
parent
810678ebcb
commit
233a3c4034
|
@ -1010,8 +1010,11 @@ SSyncNode* syncNodeOpen(SSyncInfo* pSyncInfo, int32_t vnodeVersion) {
|
||||||
sNTrace(pSyncNode, "reset commit index by snapshot");
|
sNTrace(pSyncNode, "reset commit index by snapshot");
|
||||||
}
|
}
|
||||||
pSyncNode->fsmState = snapshot.state;
|
pSyncNode->fsmState = snapshot.state;
|
||||||
if (pSyncNode->fsmState) {
|
if (pSyncNode->fsmState != SYNC_FSM_STATE_NORMAL) {
|
||||||
sError("vgId:%d, fsm state incomplete.", pSyncNode->vgId);
|
sError("vgId:%d, fsm state is incomplete.", pSyncNode->vgId);
|
||||||
|
if (pSyncNode->replicaNum == 1) {
|
||||||
|
goto _error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pSyncNode->commitIndex = commitIndex;
|
pSyncNode->commitIndex = commitIndex;
|
||||||
|
|
Loading…
Reference in New Issue