[TD-2165]<fix>: fix bugs in cancel query.

This commit is contained in:
Haojun Liao 2020-12-07 10:53:21 +08:00
parent 437fe00d61
commit 6f6fc46b0d
2 changed files with 3 additions and 3 deletions

View File

@ -92,6 +92,7 @@ void dnodeDispatchToVReadQueue(SRpcMsg *pMsg) {
pHead->vgId = htonl(pHead->vgId);
pHead->contLen = htonl(pHead->contLen);
assert(pHead->contLen > 0);
void *pVnode = vnodeAcquire(pHead->vgId);
if (pVnode != NULL) {
int32_t code = vnodeWriteToRQueue(pVnode, pCont, pHead->contLen, TAOS_QTYPE_RPC, pMsg);

View File

@ -415,7 +415,7 @@ int32_t vnodeNotifyCurrentQhandle(void *handle, void *qhandle, int32_t vgId) {
pCancelMsg->header.contLen = htonl(sizeof(SCancelQueryMsg));
vDebug("QInfo:%p register qhandle to connect:%p", qhandle, handle);
return rpcReportProgress(handle, (char *)pCancelMsg, sizeof(SRetrieveTableMsg));
return rpcReportProgress(handle, (char *)pCancelMsg, sizeof(SCancelQueryMsg));
}
int32_t vnodeProcessCancelMsg(SVnodeObj *pVnode, SVReadMsg *pRead) {
@ -451,6 +451,5 @@ int32_t vnodeProcessCancelMsg(SVnodeObj *pVnode, SVReadMsg *pRead) {
qReleaseQInfo(pVnode->qMgmt, (void **)&handle, true);
vnodeBuildNoResultQueryRsp(pRet);
code = TSDB_CODE_TSC_QUERY_CANCELLED;
return code;
return TSDB_CODE_TSC_QUERY_CANCELLED;
}