sync integration

This commit is contained in:
Minghao Li 2022-04-19 16:24:05 +08:00
parent 12294b0100
commit 4fbcb4929a
2 changed files with 8 additions and 2 deletions

View File

@ -186,7 +186,10 @@ static void vmProcessApplyQueue(SQueueInfo *pInfo, STaosQall *qall, int32_t numO
(void)vnodeProcessWriteReq(pVnode->pImpl, &pMsg->rpcMsg, &pRsp); (void)vnodeProcessWriteReq(pVnode->pImpl, &pMsg->rpcMsg, &pRsp);
// sync integration response // sync integration response
// if leader send response // leader
// if (pMsg->rpcMsg.handle != NULL && pMsg->rpcMsg.ahandle !-NULL) {
// send response;
//}
} }
} }

View File

@ -117,9 +117,12 @@ void vnodeSyncCommitCb(struct SSyncFSM *pFsm, const SRpcMsg *pMsg, SFsmCbMeta cb
SVnode *pVnode = (SVnode *)(pFsm->data); SVnode *pVnode = (SVnode *)(pFsm->data);
SRpcMsg saveRpcMsg; SRpcMsg saveRpcMsg;
int32_t ret = syncGetAndDelRespRpc(pVnode->sync, cbMeta.seqNum, &saveRpcMsg); int32_t ret = syncGetAndDelRespRpc(pVnode->sync, cbMeta.seqNum, &saveRpcMsg);
if (ret == 1) { if (ret == 1 && cbMeta.state == TAOS_SYNC_STATE_LEADER) {
applyMsg.handle = saveRpcMsg.handle; applyMsg.handle = saveRpcMsg.handle;
applyMsg.ahandle = saveRpcMsg.ahandle; applyMsg.ahandle = saveRpcMsg.ahandle;
} else {
applyMsg.handle = NULL;
applyMsg.ahandle = NULL;
} }
// put to applyQ // put to applyQ