Merge pull request #1492 from taosdata/refactor/cluster
[TD-17] fix refcount error in query message
This commit is contained in:
commit
ddd092f60e
|
@ -77,15 +77,8 @@ void dnodeRead(SRpcMsg *pMsg) {
|
||||||
char *pCont = (char *) pMsg->pCont;
|
char *pCont = (char *) pMsg->pCont;
|
||||||
SRpcContext *pRpcContext = NULL;
|
SRpcContext *pRpcContext = NULL;
|
||||||
|
|
||||||
dTrace("dnode read msg disposal");
|
dTrace("dnode %s msg incoming, thandle:%p", taosMsg[pMsg->msgType], pMsg->handle);
|
||||||
|
|
||||||
// SMsgDesc *pDesc = pCont;
|
|
||||||
// pDesc->numOfVnodes = htonl(pDesc->numOfVnodes);
|
|
||||||
// pCont += sizeof(SMsgDesc);
|
|
||||||
// if (pDesc->numOfVnodes > 1) {
|
|
||||||
// pRpcContext = calloc(sizeof(SRpcContext), 1);
|
|
||||||
// pRpcContext->numOfVnodes = pDesc->numOfVnodes;
|
|
||||||
// }
|
|
||||||
if (pMsg->msgType == TSDB_MSG_TYPE_RETRIEVE) {
|
if (pMsg->msgType == TSDB_MSG_TYPE_RETRIEVE) {
|
||||||
queuedMsgNum = 0;
|
queuedMsgNum = 0;
|
||||||
}
|
}
|
||||||
|
@ -176,10 +169,7 @@ static void *dnodeProcessReadQueue(void *param) {
|
||||||
terrno = TSDB_CODE_MSG_NOT_PROCESSED;
|
terrno = TSDB_CODE_MSG_NOT_PROCESSED;
|
||||||
}
|
}
|
||||||
|
|
||||||
// dnodeProcessReadResult(pVnode, pReadMsg);
|
|
||||||
taosFreeQitem(pReadMsg);
|
taosFreeQitem(pReadMsg);
|
||||||
|
|
||||||
dnodeReleaseVnode(pVnode);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -201,8 +191,6 @@ static void dnodeProcessReadResult(void *pVnode, SReadMsg *pRead) {
|
||||||
SRpcContext *pRpcContext = pRead->pRpcContext;
|
SRpcContext *pRpcContext = pRead->pRpcContext;
|
||||||
int32_t code = 0;
|
int32_t code = 0;
|
||||||
|
|
||||||
dnodeReleaseVnode(pVnode);
|
|
||||||
|
|
||||||
if (pRpcContext) {
|
if (pRpcContext) {
|
||||||
if (terrno) {
|
if (terrno) {
|
||||||
if (pRpcContext->code == 0) pRpcContext->code = terrno;
|
if (pRpcContext->code == 0) pRpcContext->code = terrno;
|
||||||
|
@ -266,6 +254,8 @@ static void dnodeProcessQueryMsg(void *pVnode, SReadMsg *pMsg) {
|
||||||
};
|
};
|
||||||
|
|
||||||
rpcSendResponse(&rpcRsp);
|
rpcSendResponse(&rpcRsp);
|
||||||
|
dTrace("dnode query msg disposed, thandle:%p", pMsg->rpcMsg.handle);
|
||||||
|
dnodeReleaseVnode(pVnode);
|
||||||
} else {
|
} else {
|
||||||
pQInfo = pMsg->pCont;
|
pQInfo = pMsg->pCont;
|
||||||
}
|
}
|
||||||
|
@ -308,4 +298,6 @@ static void dnodeProcessRetrieveMsg(void *pVnode, SReadMsg *pMsg) {
|
||||||
};
|
};
|
||||||
|
|
||||||
rpcSendResponse(&rpcRsp);
|
rpcSendResponse(&rpcRsp);
|
||||||
|
dTrace("dnode retrieve msg disposed, thandle:%p", pMsg->rpcMsg.handle);
|
||||||
|
dnodeReleaseVnode(pVnode);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue