fix: fix crash issue
This commit is contained in:
parent
bd81d9b5fc
commit
bdee43e3cc
|
@ -1058,7 +1058,18 @@ _return:
|
|||
ctgReleaseVgInfoToCache(pCtg, dbCache);
|
||||
}
|
||||
|
||||
if (pTask->res || code) {
|
||||
#if CTG_BATCH_FETCH
|
||||
if (code) {
|
||||
SMetaRes* pRes = taosArrayGet(ctx->pTbMetas, pFetch->reqIdx);
|
||||
pRes->code = code;
|
||||
pRes->pRes = NULL;
|
||||
if (0 == atomic_sub_fetch_32(&ctx->fetchNum, 1)) {
|
||||
TSWAP(pTask->res, ctx->pTbMetas);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (pTask->res) {
|
||||
ctgHandleTaskEnd(pTask, code);
|
||||
}
|
||||
|
||||
|
|
|
@ -388,11 +388,11 @@ int32_t qWorkerProcessQueryMsg(void *node, void *qWorkerMgmt, SRpcMsg *pMsg, int
|
|||
char * sql = strndup(msg->msg, msg->sqlLen);
|
||||
QW_SCH_TASK_DLOG("processQuery start, node:%p, type:%s, handle:%p, SQL:%s", node, TMSG_INFO(pMsg->msgType), pMsg->info.handle, sql);
|
||||
QW_ERR_JRET(qwProcessQuery(QW_FPARAMS(), &qwMsg, sql));
|
||||
QW_SCH_TASK_DLOG("processQuery end, node:%p", node);
|
||||
|
||||
_return:
|
||||
|
||||
taosMemoryFree(sql);
|
||||
QW_SCH_TASK_DLOG("processQuery end, node:%p, code:%d", node, code);
|
||||
|
||||
return code;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue