提交 9dc8bea8 编写于 作者: S slguan

[TD-17] fix refcount error in query message

上级 6682813f
...@@ -77,15 +77,8 @@ void dnodeRead(SRpcMsg *pMsg) { ...@@ -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) { ...@@ -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) { ...@@ -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) { ...@@ -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) { ...@@ -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);
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册