refactor: sync

This commit is contained in:
Hongze Cheng 2022-04-19 09:11:40 +00:00
parent 167657c192
commit a63559cfef
2 changed files with 20 additions and 17 deletions

View File

@ -80,7 +80,8 @@ typedef struct SRpcInit {
RpcCfp cfp; RpcCfp cfp;
// call back to retrieve the client auth info, for server app only // call back to retrieve the client auth info, for server app only
RpcAfp afp;; RpcAfp afp;
;
void *parent; void *parent;
} SRpcInit; } SRpcInit;

View File

@ -116,7 +116,7 @@ static void vmProcessWriteQueue(SQueueInfo *pInfo, STaosQall *qall, int32_t numO
} }
} }
#if 1 #if 0
int64_t version; int64_t version;
vnodePreprocessWriteReqs(pVnode->pImpl, pArray, &version); vnodePreprocessWriteReqs(pVnode->pImpl, pArray, &version);
@ -180,8 +180,10 @@ static void vmProcessApplyQueue(SQueueInfo *pInfo, STaosQall *qall, int32_t numO
SNodeMsg *pMsg = NULL; SNodeMsg *pMsg = NULL;
SRpcMsg rsp; SRpcMsg rsp;
static int64_t version = 0;
for (int32_t i = 0; i < numOfMsgs; ++i) { for (int32_t i = 0; i < numOfMsgs; ++i) {
#if 0 #if 1
taosGetQitem(qall, (void **)&pMsg); taosGetQitem(qall, (void **)&pMsg);
if (pMsg->rpcMsg.handle != NULL && pMsg->rpcMsg.ahandle != NULL) { if (pMsg->rpcMsg.handle != NULL && pMsg->rpcMsg.ahandle != NULL) {
@ -191,7 +193,7 @@ static void vmProcessApplyQueue(SQueueInfo *pInfo, STaosQall *qall, int32_t numO
rsp.pCont = NULL; rsp.pCont = NULL;
rsp.contLen = 0; rsp.contLen = 0;
if (vnodeProcessWriteReq(pVnode->pImpl, &pMsg->rpcMsg, &rsp) < 0) { if (vnodeProcessWriteReq(pVnode->pImpl, &pMsg->rpcMsg, version++, &rsp) < 0) {
rsp.code = terrno; rsp.code = terrno;
tmsgSendRsp(&rsp); tmsgSendRsp(&rsp);
} }