[td-225] handle the error in query
This commit is contained in:
parent
912137cf46
commit
3a699e940c
|
@ -110,19 +110,24 @@ static int32_t vnodeProcessQueryMsg(SVnodeObj *pVnode, SReadMsg *pReadMsg) {
|
||||||
pRet->rsp = pRsp;
|
pRet->rsp = pRsp;
|
||||||
|
|
||||||
// current connect is broken
|
// current connect is broken
|
||||||
if ((code == TSDB_CODE_SUCCESS) &&
|
if (code == TSDB_CODE_SUCCESS) {
|
||||||
(vnodeNotifyCurrentQhandle(pReadMsg->rpcMsg.handle, pQInfo, pVnode->vgId) != TSDB_CODE_SUCCESS)) {
|
if (vnodeNotifyCurrentQhandle(pReadMsg->rpcMsg.handle, pQInfo, pVnode->vgId) != TSDB_CODE_SUCCESS) {
|
||||||
vError("vgId:%d, QInfo:%p, dnode query discarded since link is broken, %p", pVnode->vgId, pQInfo, pReadMsg->rpcMsg.handle);
|
vError("vgId:%d, QInfo:%p, dnode query discarded since link is broken, %p", pVnode->vgId, pQInfo,
|
||||||
pRsp->code = TSDB_CODE_RPC_NETWORK_UNAVAIL;
|
pReadMsg->rpcMsg.handle);
|
||||||
|
pRsp->code = TSDB_CODE_RPC_NETWORK_UNAVAIL;
|
||||||
|
|
||||||
//NOTE: there two refcount, needs to kill twice, todo refactor
|
// NOTE: there two refcount, needs to kill twice, todo refactor
|
||||||
qKillQuery(pQInfo, vnodeRelease, pVnode);
|
qKillQuery(pQInfo, vnodeRelease, pVnode);
|
||||||
qKillQuery(pQInfo, vnodeRelease, pVnode);
|
qKillQuery(pQInfo, vnodeRelease, pVnode);
|
||||||
|
|
||||||
return pRsp->code;
|
return pRsp->code;
|
||||||
|
}
|
||||||
|
|
||||||
|
vTrace("vgId:%d, QInfo:%p, dnode query msg disposed", pVnode->vgId, pQInfo);
|
||||||
|
} else {
|
||||||
|
assert(pQInfo == NULL);
|
||||||
|
vnodeRelease(pVnode);
|
||||||
}
|
}
|
||||||
|
|
||||||
vTrace("vgId:%d, QInfo:%p, dnode query msg disposed", pVnode->vgId, pQInfo);
|
|
||||||
} else {
|
} else {
|
||||||
assert(pCont != NULL);
|
assert(pCont != NULL);
|
||||||
pQInfo = pCont;
|
pQInfo = pCont;
|
||||||
|
|
Loading…
Reference in New Issue