sync integration
This commit is contained in:
parent
12294b0100
commit
4fbcb4929a
|
@ -186,7 +186,10 @@ static void vmProcessApplyQueue(SQueueInfo *pInfo, STaosQall *qall, int32_t numO
|
|||
(void)vnodeProcessWriteReq(pVnode->pImpl, &pMsg->rpcMsg, &pRsp);
|
||||
|
||||
// sync integration response
|
||||
// if leader send response
|
||||
// leader
|
||||
// if (pMsg->rpcMsg.handle != NULL && pMsg->rpcMsg.ahandle !-NULL) {
|
||||
// send response;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -117,9 +117,12 @@ void vnodeSyncCommitCb(struct SSyncFSM *pFsm, const SRpcMsg *pMsg, SFsmCbMeta cb
|
|||
SVnode *pVnode = (SVnode *)(pFsm->data);
|
||||
SRpcMsg 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.ahandle = saveRpcMsg.ahandle;
|
||||
} else {
|
||||
applyMsg.handle = NULL;
|
||||
applyMsg.ahandle = NULL;
|
||||
}
|
||||
|
||||
// put to applyQ
|
||||
|
|
Loading…
Reference in New Issue