fix/TD-31891-remove-void-sync2-fix-case
This commit is contained in:
parent
2b3d83715f
commit
2593f71f7c
|
@ -650,9 +650,9 @@ int64_t syncLogBufferProceed(SSyncLogBuffer* pBuf, SSyncNode* pNode, SyncTerm* p
|
|||
}
|
||||
|
||||
// replicate on demand
|
||||
int32_t ret = 0;
|
||||
if ((ret = syncNodeReplicateWithoutLock(pNode)) != 0) {
|
||||
sError("vgId:%d, failed to replicate since %s. index:%" PRId64, pNode->vgId, tstrerror(ret), pEntry->index);
|
||||
if ((code = syncNodeReplicateWithoutLock(pNode)) != 0) {
|
||||
sError("vgId:%d, failed to replicate since %s. index:%" PRId64, pNode->vgId, tstrerror(code), pEntry->index);
|
||||
goto _out;
|
||||
}
|
||||
|
||||
if (pEntry->index != pBuf->matchIndex) {
|
||||
|
|
|
@ -68,7 +68,7 @@ int32_t syncNodeReplicate(SSyncNode* pNode) {
|
|||
int32_t syncNodeReplicateWithoutLock(SSyncNode* pNode) {
|
||||
if ((pNode->state != TAOS_SYNC_STATE_LEADER && pNode->state != TAOS_SYNC_STATE_ASSIGNED_LEADER) ||
|
||||
pNode->raftCfg.cfg.totalReplicaNum == 1) {
|
||||
TAOS_RETURN(TSDB_CODE_FAILED);
|
||||
TAOS_RETURN(TSDB_CODE_SUCCESS);
|
||||
}
|
||||
for (int32_t i = 0; i < pNode->totalReplicaNum; i++) {
|
||||
if (syncUtilSameId(&pNode->replicasId[i], &pNode->myRaftId)) {
|
||||
|
|
Loading…
Reference in New Issue