fix/TD-31542-fix-case
This commit is contained in:
parent
e4a4832bb9
commit
7322f68240
|
@ -730,7 +730,7 @@ SyncIndex syncNodeGetSnapshotConfigIndex(SSyncNode* pSyncNode, SyncIndex snapsho
|
|||
sError("vgId:%d, failed get snapshot config index, configIndexCount:%d", pSyncNode->vgId,
|
||||
pSyncNode->raftCfg.configIndexCount);
|
||||
terrno = TSDB_CODE_SYN_INTERNAL_ERROR;
|
||||
return -1;
|
||||
return -2;
|
||||
}
|
||||
SyncIndex lastIndex = (pSyncNode->raftCfg.configIndexArr)[0];
|
||||
|
||||
|
|
|
@ -611,17 +611,18 @@ int32_t syncFsmExecute(SSyncNode* pNode, SSyncFSM* pFsm, ESyncState role, SyncTe
|
|||
int32_t code = 0, lino = 0;
|
||||
bool retry = false;
|
||||
do {
|
||||
SRpcMsg rpcMsg = {.code = applyCode};
|
||||
TAOS_CHECK_EXIT(syncEntry2OriginalRpc(pEntry, &rpcMsg));
|
||||
|
||||
SFsmCbMeta cbMeta = {0};
|
||||
cbMeta.index = pEntry->index;
|
||||
cbMeta.lastConfigIndex = syncNodeGetSnapshotConfigIndex(pNode, pEntry->index);
|
||||
if (cbMeta.lastConfigIndex < 0) {
|
||||
if (cbMeta.lastConfigIndex < -1) {
|
||||
code = TSDB_CODE_SYN_INTERNAL_ERROR;
|
||||
if (terrno != 0) code = terrno;
|
||||
return code;
|
||||
}
|
||||
|
||||
SRpcMsg rpcMsg = {.code = applyCode};
|
||||
TAOS_CHECK_EXIT(syncEntry2OriginalRpc(pEntry, &rpcMsg));
|
||||
|
||||
cbMeta.index = pEntry->index;
|
||||
cbMeta.isWeak = pEntry->isWeak;
|
||||
cbMeta.code = applyCode;
|
||||
cbMeta.state = role;
|
||||
|
|
Loading…
Reference in New Issue