Merge pull request #16873 from taosdata/fix/avoidTSCMemleak
fix(tsc): avoid mem leak
This commit is contained in:
commit
0bdd271f16
|
@ -34,6 +34,7 @@ int32_t genericRspCallback(void* param, SDataBuf* pMsg, int32_t code) {
|
||||||
removeMeta(pRequest->pTscObj, pRequest->targetTableList);
|
removeMeta(pRequest->pTscObj, pRequest->targetTableList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
taosMemoryFree(pMsg->pEpSet);
|
||||||
taosMemoryFree(pMsg->pData);
|
taosMemoryFree(pMsg->pData);
|
||||||
if (pRequest->body.queryFp != NULL) {
|
if (pRequest->body.queryFp != NULL) {
|
||||||
pRequest->body.queryFp(pRequest->body.param, pRequest, code);
|
pRequest->body.queryFp(pRequest->body.param, pRequest, code);
|
||||||
|
@ -46,6 +47,7 @@ int32_t genericRspCallback(void* param, SDataBuf* pMsg, int32_t code) {
|
||||||
int32_t processConnectRsp(void* param, SDataBuf* pMsg, int32_t code) {
|
int32_t processConnectRsp(void* param, SDataBuf* pMsg, int32_t code) {
|
||||||
SRequestObj* pRequest = param;
|
SRequestObj* pRequest = param;
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
|
taosMemoryFree(pMsg->pEpSet);
|
||||||
taosMemoryFree(pMsg->pData);
|
taosMemoryFree(pMsg->pData);
|
||||||
setErrno(pRequest, code);
|
setErrno(pRequest, code);
|
||||||
tsem_post(&pRequest->body.rspSem);
|
tsem_post(&pRequest->body.rspSem);
|
||||||
|
@ -62,6 +64,7 @@ int32_t processConnectRsp(void* param, SDataBuf* pMsg, int32_t code) {
|
||||||
if (delta > timestampDeltaLimit) {
|
if (delta > timestampDeltaLimit) {
|
||||||
code = TSDB_CODE_TIME_UNSYNCED;
|
code = TSDB_CODE_TIME_UNSYNCED;
|
||||||
tscError("time diff:%ds is too big", delta);
|
tscError("time diff:%ds is too big", delta);
|
||||||
|
taosMemoryFree(pMsg->pEpSet);
|
||||||
taosMemoryFree(pMsg->pData);
|
taosMemoryFree(pMsg->pData);
|
||||||
setErrno(pRequest, code);
|
setErrno(pRequest, code);
|
||||||
tsem_post(&pRequest->body.rspSem);
|
tsem_post(&pRequest->body.rspSem);
|
||||||
|
@ -70,6 +73,7 @@ int32_t processConnectRsp(void* param, SDataBuf* pMsg, int32_t code) {
|
||||||
|
|
||||||
/*assert(connectRsp.epSet.numOfEps > 0);*/
|
/*assert(connectRsp.epSet.numOfEps > 0);*/
|
||||||
if (connectRsp.epSet.numOfEps == 0) {
|
if (connectRsp.epSet.numOfEps == 0) {
|
||||||
|
taosMemoryFree(pMsg->pEpSet);
|
||||||
taosMemoryFree(pMsg->pData);
|
taosMemoryFree(pMsg->pData);
|
||||||
setErrno(pRequest, TSDB_CODE_MND_APP_ERROR);
|
setErrno(pRequest, TSDB_CODE_MND_APP_ERROR);
|
||||||
tsem_post(&pRequest->body.rspSem);
|
tsem_post(&pRequest->body.rspSem);
|
||||||
|
@ -114,6 +118,7 @@ int32_t processConnectRsp(void* param, SDataBuf* pMsg, int32_t code) {
|
||||||
pTscObj->pAppInfo->numOfConns);
|
pTscObj->pAppInfo->numOfConns);
|
||||||
|
|
||||||
taosMemoryFree(pMsg->pData);
|
taosMemoryFree(pMsg->pData);
|
||||||
|
taosMemoryFree(pMsg->pEpSet);
|
||||||
tsem_post(&pRequest->body.rspSem);
|
tsem_post(&pRequest->body.rspSem);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -137,6 +142,7 @@ int32_t processCreateDbRsp(void* param, SDataBuf* pMsg, int32_t code) {
|
||||||
// todo rsp with the vnode id list
|
// todo rsp with the vnode id list
|
||||||
SRequestObj* pRequest = param;
|
SRequestObj* pRequest = param;
|
||||||
taosMemoryFree(pMsg->pData);
|
taosMemoryFree(pMsg->pData);
|
||||||
|
taosMemoryFree(pMsg->pEpSet);
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
setErrno(pRequest, code);
|
setErrno(pRequest, code);
|
||||||
}
|
}
|
||||||
|
@ -173,6 +179,7 @@ int32_t processUseDbRsp(void* param, SDataBuf* pMsg, int32_t code) {
|
||||||
|
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
taosMemoryFree(pMsg->pData);
|
taosMemoryFree(pMsg->pData);
|
||||||
|
taosMemoryFree(pMsg->pEpSet);
|
||||||
setErrno(pRequest, code);
|
setErrno(pRequest, code);
|
||||||
|
|
||||||
if (pRequest->body.queryFp != NULL) {
|
if (pRequest->body.queryFp != NULL) {
|
||||||
|
@ -220,6 +227,7 @@ int32_t processUseDbRsp(void* param, SDataBuf* pMsg, int32_t code) {
|
||||||
|
|
||||||
setConnectionDB(pRequest->pTscObj, db);
|
setConnectionDB(pRequest->pTscObj, db);
|
||||||
taosMemoryFree(pMsg->pData);
|
taosMemoryFree(pMsg->pData);
|
||||||
|
taosMemoryFree(pMsg->pEpSet);
|
||||||
|
|
||||||
if (pRequest->body.queryFp != NULL) {
|
if (pRequest->body.queryFp != NULL) {
|
||||||
pRequest->body.queryFp(pRequest->body.param, pRequest, pRequest->code);
|
pRequest->body.queryFp(pRequest->body.param, pRequest, pRequest->code);
|
||||||
|
@ -237,7 +245,7 @@ int32_t processCreateSTableRsp(void* param, SDataBuf* pMsg, int32_t code) {
|
||||||
setErrno(pRequest, code);
|
setErrno(pRequest, code);
|
||||||
} else {
|
} else {
|
||||||
SMCreateStbRsp createRsp = {0};
|
SMCreateStbRsp createRsp = {0};
|
||||||
SDecoder coder = {0};
|
SDecoder coder = {0};
|
||||||
tDecoderInit(&coder, pMsg->pData, pMsg->len);
|
tDecoderInit(&coder, pMsg->pData, pMsg->len);
|
||||||
tDecodeSMCreateStbRsp(&coder, &createRsp);
|
tDecodeSMCreateStbRsp(&coder, &createRsp);
|
||||||
tDecoderClear(&coder);
|
tDecoderClear(&coder);
|
||||||
|
@ -246,6 +254,7 @@ int32_t processCreateSTableRsp(void* param, SDataBuf* pMsg, int32_t code) {
|
||||||
pRequest->body.resInfo.execRes.res = createRsp.pMeta;
|
pRequest->body.resInfo.execRes.res = createRsp.pMeta;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
taosMemoryFree(pMsg->pEpSet);
|
||||||
taosMemoryFree(pMsg->pData);
|
taosMemoryFree(pMsg->pData);
|
||||||
|
|
||||||
if (pRequest->body.queryFp != NULL) {
|
if (pRequest->body.queryFp != NULL) {
|
||||||
|
@ -262,7 +271,7 @@ int32_t processCreateSTableRsp(void* param, SDataBuf* pMsg, int32_t code) {
|
||||||
code = ret;
|
code = ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pRequest->body.queryFp(pRequest->body.param, pRequest, code);
|
pRequest->body.queryFp(pRequest->body.param, pRequest, code);
|
||||||
} else {
|
} else {
|
||||||
tsem_post(&pRequest->body.rspSem);
|
tsem_post(&pRequest->body.rspSem);
|
||||||
|
@ -284,6 +293,7 @@ int32_t processDropDbRsp(void* param, SDataBuf* pMsg, int32_t code) {
|
||||||
}
|
}
|
||||||
|
|
||||||
taosMemoryFree(pMsg->pData);
|
taosMemoryFree(pMsg->pData);
|
||||||
|
taosMemoryFree(pMsg->pEpSet);
|
||||||
|
|
||||||
if (pRequest->body.queryFp != NULL) {
|
if (pRequest->body.queryFp != NULL) {
|
||||||
pRequest->body.queryFp(pRequest->body.param, pRequest, code);
|
pRequest->body.queryFp(pRequest->body.param, pRequest, code);
|
||||||
|
@ -309,6 +319,7 @@ int32_t processAlterStbRsp(void* param, SDataBuf* pMsg, int32_t code) {
|
||||||
}
|
}
|
||||||
|
|
||||||
taosMemoryFree(pMsg->pData);
|
taosMemoryFree(pMsg->pData);
|
||||||
|
taosMemoryFree(pMsg->pEpSet);
|
||||||
|
|
||||||
if (pRequest->body.queryFp != NULL) {
|
if (pRequest->body.queryFp != NULL) {
|
||||||
SExecResult* pRes = &pRequest->body.resInfo.execRes;
|
SExecResult* pRes = &pRequest->body.resInfo.execRes;
|
||||||
|
@ -420,6 +431,7 @@ int32_t processShowVariablesRsp(void* param, SDataBuf* pMsg, int32_t code) {
|
||||||
}
|
}
|
||||||
|
|
||||||
taosMemoryFree(pMsg->pData);
|
taosMemoryFree(pMsg->pData);
|
||||||
|
taosMemoryFree(pMsg->pEpSet);
|
||||||
|
|
||||||
if (pRequest->body.queryFp != NULL) {
|
if (pRequest->body.queryFp != NULL) {
|
||||||
pRequest->body.queryFp(pRequest->body.param, pRequest, code);
|
pRequest->body.queryFp(pRequest->body.param, pRequest, code);
|
||||||
|
|
|
@ -1077,6 +1077,7 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) {
|
||||||
tsem_destroy(&pParam->rspSem);
|
tsem_destroy(&pParam->rspSem);
|
||||||
taosMemoryFree(pParam);
|
taosMemoryFree(pParam);
|
||||||
taosMemoryFree(pMsg->pData);
|
taosMemoryFree(pMsg->pData);
|
||||||
|
taosMemoryFree(pMsg->pEpSet);
|
||||||
terrno = TSDB_CODE_TMQ_CONSUMER_CLOSED;
|
terrno = TSDB_CODE_TMQ_CONSUMER_CLOSED;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -1115,6 +1116,7 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) {
|
||||||
tmqEpoch);
|
tmqEpoch);
|
||||||
tsem_post(&tmq->rspSem);
|
tsem_post(&tmq->rspSem);
|
||||||
taosMemoryFree(pMsg->pData);
|
taosMemoryFree(pMsg->pData);
|
||||||
|
taosMemoryFree(pMsg->pEpSet);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1128,6 +1130,7 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) {
|
||||||
SMqPollRspWrapper* pRspWrapper = taosAllocateQitem(sizeof(SMqPollRspWrapper), DEF_QITEM);
|
SMqPollRspWrapper* pRspWrapper = taosAllocateQitem(sizeof(SMqPollRspWrapper), DEF_QITEM);
|
||||||
if (pRspWrapper == NULL) {
|
if (pRspWrapper == NULL) {
|
||||||
taosMemoryFree(pMsg->pData);
|
taosMemoryFree(pMsg->pData);
|
||||||
|
taosMemoryFree(pMsg->pEpSet);
|
||||||
tscWarn("msg discard from vgId:%d, epoch %d since out of memory", vgId, epoch);
|
tscWarn("msg discard from vgId:%d, epoch %d since out of memory", vgId, epoch);
|
||||||
goto CREATE_MSG_FAIL;
|
goto CREATE_MSG_FAIL;
|
||||||
}
|
}
|
||||||
|
@ -1164,6 +1167,7 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) {
|
||||||
}
|
}
|
||||||
|
|
||||||
taosMemoryFree(pMsg->pData);
|
taosMemoryFree(pMsg->pData);
|
||||||
|
taosMemoryFree(pMsg->pEpSet);
|
||||||
|
|
||||||
taosWriteQitem(tmq->mqueue, pRspWrapper);
|
taosWriteQitem(tmq->mqueue, pRspWrapper);
|
||||||
tsem_post(&tmq->rspSem);
|
tsem_post(&tmq->rspSem);
|
||||||
|
|
|
@ -270,7 +270,7 @@ int32_t dmInitClient(SDnode *pDnode) {
|
||||||
|
|
||||||
SRpcInit rpcInit = {0};
|
SRpcInit rpcInit = {0};
|
||||||
rpcInit.label = "DND-C";
|
rpcInit.label = "DND-C";
|
||||||
rpcInit.numOfThreads = 1;
|
rpcInit.numOfThreads = 4;
|
||||||
rpcInit.cfp = (RpcCfp)dmProcessRpcMsg;
|
rpcInit.cfp = (RpcCfp)dmProcessRpcMsg;
|
||||||
rpcInit.sessions = 1024;
|
rpcInit.sessions = 1024;
|
||||||
rpcInit.connType = TAOS_CONN_CLIENT;
|
rpcInit.connType = TAOS_CONN_CLIENT;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -68,14 +68,15 @@ int32_t ctgHandleBatchRsp(SCtgJob* pJob, SCtgTaskCallbackParam* cbParam, SDataBu
|
||||||
taskMsg.pData = NULL;
|
taskMsg.pData = NULL;
|
||||||
taskMsg.len = 0;
|
taskMsg.len = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SCtgTaskReq tReq;
|
SCtgTaskReq tReq;
|
||||||
tReq.pTask = pTask;
|
tReq.pTask = pTask;
|
||||||
tReq.msgIdx = rsp.msgIdx;
|
tReq.msgIdx = rsp.msgIdx;
|
||||||
SCtgMsgCtx* pMsgCtx = CTG_GET_TASK_MSGCTX(pTask, tReq.msgIdx);
|
SCtgMsgCtx* pMsgCtx = CTG_GET_TASK_MSGCTX(pTask, tReq.msgIdx);
|
||||||
pMsgCtx->pBatchs = pBatchs;
|
pMsgCtx->pBatchs = pBatchs;
|
||||||
|
|
||||||
ctgDebug("QID:0x%" PRIx64 " ctg task %d idx %d start to handle rsp %s, pBatchs: %p", pJob->queryId, pTask->taskId, rsp.msgIdx, TMSG_INFO(taskMsg.msgType + 1), pBatchs);
|
ctgDebug("QID:0x%" PRIx64 " ctg task %d idx %d start to handle rsp %s, pBatchs: %p", pJob->queryId, pTask->taskId,
|
||||||
|
rsp.msgIdx, TMSG_INFO(taskMsg.msgType + 1), pBatchs);
|
||||||
|
|
||||||
(*gCtgAsyncFps[pTask->type].handleRspFp)(&tReq, rsp.reqType, &taskMsg, (rsp.rspCode ? rsp.rspCode : rspCode));
|
(*gCtgAsyncFps[pTask->type].handleRspFp)(&tReq, rsp.reqType, &taskMsg, (rsp.rspCode ? rsp.rspCode : rspCode));
|
||||||
}
|
}
|
||||||
|
@ -344,13 +345,14 @@ int32_t ctgHandleMsgCallback(void* param, SDataBuf* pMsg, int32_t rspCode) {
|
||||||
CTG_ERR_JRET(TSDB_CODE_OUT_OF_MEMORY);
|
CTG_ERR_JRET(TSDB_CODE_OUT_OF_MEMORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
SCtgMsgCtx *pMsgCtx = CTG_GET_TASK_MSGCTX(pTask, -1);
|
SCtgMsgCtx* pMsgCtx = CTG_GET_TASK_MSGCTX(pTask, -1);
|
||||||
pMsgCtx->pBatchs = pBatchs;
|
pMsgCtx->pBatchs = pBatchs;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SCtgTaskReq tReq;
|
SCtgTaskReq tReq;
|
||||||
tReq.pTask = pTask;
|
tReq.pTask = pTask;
|
||||||
tReq.msgIdx = -1;
|
tReq.msgIdx = -1;
|
||||||
|
|
||||||
CTG_ERR_JRET((*gCtgAsyncFps[pTask->type].handleRspFp)(&tReq, cbParam->reqType, pMsg, rspCode));
|
CTG_ERR_JRET((*gCtgAsyncFps[pTask->type].handleRspFp)(&tReq, cbParam->reqType, pMsg, rspCode));
|
||||||
|
|
||||||
#if CTG_BATCH_FETCH
|
#if CTG_BATCH_FETCH
|
||||||
|
@ -361,6 +363,7 @@ int32_t ctgHandleMsgCallback(void* param, SDataBuf* pMsg, int32_t rspCode) {
|
||||||
_return:
|
_return:
|
||||||
|
|
||||||
taosMemoryFree(pMsg->pData);
|
taosMemoryFree(pMsg->pData);
|
||||||
|
taosMemoryFree(pMsg->pEpSet);
|
||||||
|
|
||||||
if (pJob) {
|
if (pJob) {
|
||||||
taosReleaseRef(gCtgMgmt.jobPool, cbParam->refId);
|
taosReleaseRef(gCtgMgmt.jobPool, cbParam->refId);
|
||||||
|
@ -442,17 +445,17 @@ _return:
|
||||||
CTG_RET(code);
|
CTG_RET(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t ctgAddBatch(SCatalog* pCtg, int32_t vgId, SRequestConnInfo* pConn, SCtgTaskReq* tReq, int32_t msgType, void* msg,
|
int32_t ctgAddBatch(SCatalog* pCtg, int32_t vgId, SRequestConnInfo* pConn, SCtgTaskReq* tReq, int32_t msgType,
|
||||||
uint32_t msgSize) {
|
void* msg, uint32_t msgSize) {
|
||||||
int32_t code = 0;
|
int32_t code = 0;
|
||||||
SCtgTask* pTask = tReq->pTask;
|
SCtgTask* pTask = tReq->pTask;
|
||||||
SCtgMsgCtx* pMsgCtx = CTG_GET_TASK_MSGCTX(pTask, tReq->msgIdx);
|
SCtgMsgCtx* pMsgCtx = CTG_GET_TASK_MSGCTX(pTask, tReq->msgIdx);
|
||||||
SHashObj* pBatchs = pMsgCtx->pBatchs;
|
SHashObj* pBatchs = pMsgCtx->pBatchs;
|
||||||
SCtgJob* pJob = pTask->pJob;
|
SCtgJob* pJob = pTask->pJob;
|
||||||
SCtgBatch* pBatch = taosHashGet(pBatchs, &vgId, sizeof(vgId));
|
SCtgBatch* pBatch = taosHashGet(pBatchs, &vgId, sizeof(vgId));
|
||||||
SCtgBatch newBatch = {0};
|
SCtgBatch newBatch = {0};
|
||||||
SBatchMsg req = {0};
|
SBatchMsg req = {0};
|
||||||
|
|
||||||
if (NULL == pBatch) {
|
if (NULL == pBatch) {
|
||||||
newBatch.pMsgs = taosArrayInit(pJob->subTaskNum, sizeof(SBatchMsg));
|
newBatch.pMsgs = taosArrayInit(pJob->subTaskNum, sizeof(SBatchMsg));
|
||||||
newBatch.pTaskIds = taosArrayInit(pJob->subTaskNum, sizeof(int32_t));
|
newBatch.pTaskIds = taosArrayInit(pJob->subTaskNum, sizeof(int32_t));
|
||||||
|
@ -487,7 +490,7 @@ int32_t ctgAddBatch(SCatalog* pCtg, int32_t vgId, SRequestConnInfo* pConn, SCtgT
|
||||||
} else if (TDMT_VND_TABLE_META == msgType) {
|
} else if (TDMT_VND_TABLE_META == msgType) {
|
||||||
if (CTG_TASK_GET_TB_META_BATCH == pTask->type) {
|
if (CTG_TASK_GET_TB_META_BATCH == pTask->type) {
|
||||||
SCtgTbMetasCtx* ctx = (SCtgTbMetasCtx*)pTask->taskCtx;
|
SCtgTbMetasCtx* ctx = (SCtgTbMetasCtx*)pTask->taskCtx;
|
||||||
SCtgFetch* fetch = taosArrayGet(ctx->pFetchs, tReq->msgIdx);
|
SCtgFetch* fetch = taosArrayGet(ctx->pFetchs, tReq->msgIdx);
|
||||||
pName = ctgGetFetchName(ctx->pNames, fetch);
|
pName = ctgGetFetchName(ctx->pNames, fetch);
|
||||||
} else {
|
} else {
|
||||||
SCtgTbMetaCtx* ctx = (SCtgTbMetaCtx*)pTask->taskCtx;
|
SCtgTbMetaCtx* ctx = (SCtgTbMetaCtx*)pTask->taskCtx;
|
||||||
|
@ -521,14 +524,14 @@ int32_t ctgAddBatch(SCatalog* pCtg, int32_t vgId, SRequestConnInfo* pConn, SCtgT
|
||||||
if (NULL == taosArrayPush(pBatch->pMsgs, &req)) {
|
if (NULL == taosArrayPush(pBatch->pMsgs, &req)) {
|
||||||
CTG_ERR_JRET(TSDB_CODE_OUT_OF_MEMORY);
|
CTG_ERR_JRET(TSDB_CODE_OUT_OF_MEMORY);
|
||||||
}
|
}
|
||||||
msg = NULL;
|
msg = NULL;
|
||||||
if (NULL == taosArrayPush(pBatch->pTaskIds, &pTask->taskId)) {
|
if (NULL == taosArrayPush(pBatch->pTaskIds, &pTask->taskId)) {
|
||||||
CTG_ERR_JRET(TSDB_CODE_OUT_OF_MEMORY);
|
CTG_ERR_JRET(TSDB_CODE_OUT_OF_MEMORY);
|
||||||
}
|
}
|
||||||
if (NULL == taosArrayPush(pBatch->pMsgIdxs, &req.msgIdx)) {
|
if (NULL == taosArrayPush(pBatch->pMsgIdxs, &req.msgIdx)) {
|
||||||
CTG_ERR_JRET(TSDB_CODE_OUT_OF_MEMORY);
|
CTG_ERR_JRET(TSDB_CODE_OUT_OF_MEMORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
pBatch->msgSize += sizeof(req) + msgSize - POINTER_BYTES;
|
pBatch->msgSize += sizeof(req) + msgSize - POINTER_BYTES;
|
||||||
|
|
||||||
if (vgId > 0) {
|
if (vgId > 0) {
|
||||||
|
@ -539,7 +542,7 @@ int32_t ctgAddBatch(SCatalog* pCtg, int32_t vgId, SRequestConnInfo* pConn, SCtgT
|
||||||
} else if (TDMT_VND_TABLE_META == msgType) {
|
} else if (TDMT_VND_TABLE_META == msgType) {
|
||||||
if (CTG_TASK_GET_TB_META_BATCH == pTask->type) {
|
if (CTG_TASK_GET_TB_META_BATCH == pTask->type) {
|
||||||
SCtgTbMetasCtx* ctx = (SCtgTbMetasCtx*)pTask->taskCtx;
|
SCtgTbMetasCtx* ctx = (SCtgTbMetasCtx*)pTask->taskCtx;
|
||||||
SCtgFetch* fetch = taosArrayGet(ctx->pFetchs, tReq->msgIdx);
|
SCtgFetch* fetch = taosArrayGet(ctx->pFetchs, tReq->msgIdx);
|
||||||
pName = ctgGetFetchName(ctx->pNames, fetch);
|
pName = ctgGetFetchName(ctx->pNames, fetch);
|
||||||
} else {
|
} else {
|
||||||
SCtgTbMetaCtx* ctx = (SCtgTbMetaCtx*)pTask->taskCtx;
|
SCtgTbMetaCtx* ctx = (SCtgTbMetaCtx*)pTask->taskCtx;
|
||||||
|
@ -550,7 +553,7 @@ int32_t ctgAddBatch(SCatalog* pCtg, int32_t vgId, SRequestConnInfo* pConn, SCtgT
|
||||||
CTG_ERR_JRET(TSDB_CODE_APP_ERROR);
|
CTG_ERR_JRET(TSDB_CODE_APP_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
tNameGetFullDbName(pName, pBatch->dbFName);
|
tNameGetFullDbName(pName, pBatch->dbFName);
|
||||||
}
|
}
|
||||||
|
|
||||||
ctgDebug("task %d %s req added to batch %d, target vgId %d", pTask->taskId, TMSG_INFO(msgType), pBatch->batchId,
|
ctgDebug("task %d %s req added to batch %d, target vgId %d", pTask->taskId, TMSG_INFO(msgType), pBatch->batchId,
|
||||||
|
@ -583,7 +586,7 @@ int32_t ctgBuildBatchReqMsg(SCtgBatch* pBatch, int32_t vgId, void** msg) {
|
||||||
for (int32_t i = 0; i < num; ++i) {
|
for (int32_t i = 0; i < num; ++i) {
|
||||||
SBatchMsg* pReq = taosArrayGet(pBatch->pMsgs, i);
|
SBatchMsg* pReq = taosArrayGet(pBatch->pMsgs, i);
|
||||||
*(int32_t*)((char*)(*msg) + offset) = htonl(pReq->msgIdx);
|
*(int32_t*)((char*)(*msg) + offset) = htonl(pReq->msgIdx);
|
||||||
offset += sizeof(pReq->msgIdx);
|
offset += sizeof(pReq->msgIdx);
|
||||||
*(int32_t*)((char*)(*msg) + offset) = htonl(pReq->msgType);
|
*(int32_t*)((char*)(*msg) + offset) = htonl(pReq->msgType);
|
||||||
offset += sizeof(pReq->msgType);
|
offset += sizeof(pReq->msgType);
|
||||||
*(int32_t*)((char*)(*msg) + offset) = htonl(pReq->msgLen);
|
*(int32_t*)((char*)(*msg) + offset) = htonl(pReq->msgLen);
|
||||||
|
@ -611,7 +614,7 @@ int32_t ctgLaunchBatchs(SCatalog* pCtg, SCtgJob* pJob, SHashObj* pBatchs) {
|
||||||
ctgDebug("QID:0x%" PRIx64 " ctg start to launch batch %d", pJob->queryId, pBatch->batchId);
|
ctgDebug("QID:0x%" PRIx64 " ctg start to launch batch %d", pJob->queryId, pBatch->batchId);
|
||||||
|
|
||||||
CTG_ERR_JRET(ctgBuildBatchReqMsg(pBatch, *vgId, &msg));
|
CTG_ERR_JRET(ctgBuildBatchReqMsg(pBatch, *vgId, &msg));
|
||||||
code = ctgAsyncSendMsg(pCtg, &pBatch->conn, pJob, pBatch->pTaskIds, pBatch->batchId, pBatch->pMsgIdxs,
|
code = ctgAsyncSendMsg(pCtg, &pBatch->conn, pJob, pBatch->pTaskIds, pBatch->batchId, pBatch->pMsgIdxs,
|
||||||
pBatch->dbFName, *vgId, pBatch->msgType, msg, pBatch->msgSize);
|
pBatch->dbFName, *vgId, pBatch->msgType, msg, pBatch->msgSize);
|
||||||
pBatch->pTaskIds = NULL;
|
pBatch->pTaskIds = NULL;
|
||||||
CTG_ERR_JRET(code);
|
CTG_ERR_JRET(code);
|
||||||
|
@ -656,7 +659,7 @@ int32_t ctgGetQnodeListFromMnode(SCatalog* pCtg, SRequestConnInfo* pConn, SArray
|
||||||
#if CTG_BATCH_FETCH
|
#if CTG_BATCH_FETCH
|
||||||
SCtgTaskReq tReq;
|
SCtgTaskReq tReq;
|
||||||
tReq.pTask = pTask;
|
tReq.pTask = pTask;
|
||||||
tReq.msgIdx = -1;
|
tReq.msgIdx = -1;
|
||||||
CTG_RET(ctgAddBatch(pCtg, 0, pConn, &tReq, reqType, msg, msgLen));
|
CTG_RET(ctgAddBatch(pCtg, 0, pConn, &tReq, reqType, msg, msgLen));
|
||||||
#else
|
#else
|
||||||
SArray* pTaskId = taosArrayInit(1, sizeof(int32_t));
|
SArray* pTaskId = taosArrayInit(1, sizeof(int32_t));
|
||||||
|
@ -705,7 +708,7 @@ int32_t ctgGetDnodeListFromMnode(SCatalog* pCtg, SRequestConnInfo* pConn, SArray
|
||||||
#if CTG_BATCH_FETCH
|
#if CTG_BATCH_FETCH
|
||||||
SCtgTaskReq tReq;
|
SCtgTaskReq tReq;
|
||||||
tReq.pTask = pTask;
|
tReq.pTask = pTask;
|
||||||
tReq.msgIdx = -1;
|
tReq.msgIdx = -1;
|
||||||
CTG_RET(ctgAddBatch(pCtg, 0, pConn, &tReq, reqType, msg, msgLen));
|
CTG_RET(ctgAddBatch(pCtg, 0, pConn, &tReq, reqType, msg, msgLen));
|
||||||
#else
|
#else
|
||||||
SArray* pTaskId = taosArrayInit(1, sizeof(int32_t));
|
SArray* pTaskId = taosArrayInit(1, sizeof(int32_t));
|
||||||
|
@ -736,9 +739,9 @@ int32_t ctgGetDnodeListFromMnode(SCatalog* pCtg, SRequestConnInfo* pConn, SArray
|
||||||
|
|
||||||
int32_t ctgGetDBVgInfoFromMnode(SCatalog* pCtg, SRequestConnInfo* pConn, SBuildUseDBInput* input, SUseDbOutput* out,
|
int32_t ctgGetDBVgInfoFromMnode(SCatalog* pCtg, SRequestConnInfo* pConn, SBuildUseDBInput* input, SUseDbOutput* out,
|
||||||
SCtgTaskReq* tReq) {
|
SCtgTaskReq* tReq) {
|
||||||
char* msg = NULL;
|
char* msg = NULL;
|
||||||
int32_t msgLen = 0;
|
int32_t msgLen = 0;
|
||||||
int32_t reqType = TDMT_MND_USE_DB;
|
int32_t reqType = TDMT_MND_USE_DB;
|
||||||
SCtgTask* pTask = tReq ? tReq->pTask : NULL;
|
SCtgTask* pTask = tReq ? tReq->pTask : NULL;
|
||||||
void* (*mallocFp)(int32_t) = pTask ? taosMemoryMalloc : rpcMallocCont;
|
void* (*mallocFp)(int32_t) = pTask ? taosMemoryMalloc : rpcMallocCont;
|
||||||
|
|
||||||
|
@ -813,7 +816,7 @@ int32_t ctgGetDBCfgFromMnode(SCatalog* pCtg, SRequestConnInfo* pConn, const char
|
||||||
#if CTG_BATCH_FETCH
|
#if CTG_BATCH_FETCH
|
||||||
SCtgTaskReq tReq;
|
SCtgTaskReq tReq;
|
||||||
tReq.pTask = pTask;
|
tReq.pTask = pTask;
|
||||||
tReq.msgIdx = -1;
|
tReq.msgIdx = -1;
|
||||||
CTG_RET(ctgAddBatch(pCtg, 0, pConn, &tReq, reqType, msg, msgLen));
|
CTG_RET(ctgAddBatch(pCtg, 0, pConn, &tReq, reqType, msg, msgLen));
|
||||||
#else
|
#else
|
||||||
SArray* pTaskId = taosArrayInit(1, sizeof(int32_t));
|
SArray* pTaskId = taosArrayInit(1, sizeof(int32_t));
|
||||||
|
@ -868,7 +871,7 @@ int32_t ctgGetIndexInfoFromMnode(SCatalog* pCtg, SRequestConnInfo* pConn, const
|
||||||
#if CTG_BATCH_FETCH
|
#if CTG_BATCH_FETCH
|
||||||
SCtgTaskReq tReq;
|
SCtgTaskReq tReq;
|
||||||
tReq.pTask = pTask;
|
tReq.pTask = pTask;
|
||||||
tReq.msgIdx = -1;
|
tReq.msgIdx = -1;
|
||||||
CTG_RET(ctgAddBatch(pCtg, 0, pConn, &tReq, reqType, msg, msgLen));
|
CTG_RET(ctgAddBatch(pCtg, 0, pConn, &tReq, reqType, msg, msgLen));
|
||||||
#else
|
#else
|
||||||
SArray* pTaskId = taosArrayInit(1, sizeof(int32_t));
|
SArray* pTaskId = taosArrayInit(1, sizeof(int32_t));
|
||||||
|
@ -919,13 +922,13 @@ int32_t ctgGetTbIndexFromMnode(SCatalog* pCtg, SRequestConnInfo* pConn, SName* n
|
||||||
if (NULL == pOut) {
|
if (NULL == pOut) {
|
||||||
CTG_ERR_RET(TSDB_CODE_OUT_OF_MEMORY);
|
CTG_ERR_RET(TSDB_CODE_OUT_OF_MEMORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
CTG_ERR_RET(ctgUpdateMsgCtx(CTG_GET_TASK_MSGCTX(pTask, -1), reqType, pOut, (char*)tbFName));
|
CTG_ERR_RET(ctgUpdateMsgCtx(CTG_GET_TASK_MSGCTX(pTask, -1), reqType, pOut, (char*)tbFName));
|
||||||
|
|
||||||
#if CTG_BATCH_FETCH
|
#if CTG_BATCH_FETCH
|
||||||
SCtgTaskReq tReq;
|
SCtgTaskReq tReq;
|
||||||
tReq.pTask = pTask;
|
tReq.pTask = pTask;
|
||||||
tReq.msgIdx = -1;
|
tReq.msgIdx = -1;
|
||||||
CTG_RET(ctgAddBatch(pCtg, 0, pConn, &tReq, reqType, msg, msgLen));
|
CTG_RET(ctgAddBatch(pCtg, 0, pConn, &tReq, reqType, msg, msgLen));
|
||||||
#else
|
#else
|
||||||
SArray* pTaskId = taosArrayInit(1, sizeof(int32_t));
|
SArray* pTaskId = taosArrayInit(1, sizeof(int32_t));
|
||||||
|
@ -980,7 +983,7 @@ int32_t ctgGetUdfInfoFromMnode(SCatalog* pCtg, SRequestConnInfo* pConn, const ch
|
||||||
#if CTG_BATCH_FETCH
|
#if CTG_BATCH_FETCH
|
||||||
SCtgTaskReq tReq;
|
SCtgTaskReq tReq;
|
||||||
tReq.pTask = pTask;
|
tReq.pTask = pTask;
|
||||||
tReq.msgIdx = -1;
|
tReq.msgIdx = -1;
|
||||||
CTG_RET(ctgAddBatch(pCtg, 0, pConn, &tReq, reqType, msg, msgLen));
|
CTG_RET(ctgAddBatch(pCtg, 0, pConn, &tReq, reqType, msg, msgLen));
|
||||||
#else
|
#else
|
||||||
SArray* pTaskId = taosArrayInit(1, sizeof(int32_t));
|
SArray* pTaskId = taosArrayInit(1, sizeof(int32_t));
|
||||||
|
@ -1035,7 +1038,7 @@ int32_t ctgGetUserDbAuthFromMnode(SCatalog* pCtg, SRequestConnInfo* pConn, const
|
||||||
#if CTG_BATCH_FETCH
|
#if CTG_BATCH_FETCH
|
||||||
SCtgTaskReq tReq;
|
SCtgTaskReq tReq;
|
||||||
tReq.pTask = pTask;
|
tReq.pTask = pTask;
|
||||||
tReq.msgIdx = -1;
|
tReq.msgIdx = -1;
|
||||||
CTG_RET(ctgAddBatch(pCtg, 0, pConn, &tReq, reqType, msg, msgLen));
|
CTG_RET(ctgAddBatch(pCtg, 0, pConn, &tReq, reqType, msg, msgLen));
|
||||||
#else
|
#else
|
||||||
SArray* pTaskId = taosArrayInit(1, sizeof(int32_t));
|
SArray* pTaskId = taosArrayInit(1, sizeof(int32_t));
|
||||||
|
@ -1066,7 +1069,7 @@ int32_t ctgGetUserDbAuthFromMnode(SCatalog* pCtg, SRequestConnInfo* pConn, const
|
||||||
|
|
||||||
int32_t ctgGetTbMetaFromMnodeImpl(SCatalog* pCtg, SRequestConnInfo* pConn, char* dbFName, char* tbName,
|
int32_t ctgGetTbMetaFromMnodeImpl(SCatalog* pCtg, SRequestConnInfo* pConn, char* dbFName, char* tbName,
|
||||||
STableMetaOutput* out, SCtgTaskReq* tReq) {
|
STableMetaOutput* out, SCtgTaskReq* tReq) {
|
||||||
SCtgTask *pTask = tReq ? tReq->pTask : NULL;
|
SCtgTask* pTask = tReq ? tReq->pTask : NULL;
|
||||||
SBuildTableInput bInput = {.vgId = 0, .dbFName = dbFName, .tbName = tbName};
|
SBuildTableInput bInput = {.vgId = 0, .dbFName = dbFName, .tbName = tbName};
|
||||||
char* msg = NULL;
|
char* msg = NULL;
|
||||||
SEpSet* pVnodeEpSet = NULL;
|
SEpSet* pVnodeEpSet = NULL;
|
||||||
|
@ -1091,7 +1094,7 @@ int32_t ctgGetTbMetaFromMnodeImpl(SCatalog* pCtg, SRequestConnInfo* pConn, char*
|
||||||
}
|
}
|
||||||
|
|
||||||
CTG_ERR_RET(ctgUpdateMsgCtx(CTG_GET_TASK_MSGCTX(pTask, tReq->msgIdx), reqType, pOut, tbFName));
|
CTG_ERR_RET(ctgUpdateMsgCtx(CTG_GET_TASK_MSGCTX(pTask, tReq->msgIdx), reqType, pOut, tbFName));
|
||||||
|
|
||||||
#if CTG_BATCH_FETCH
|
#if CTG_BATCH_FETCH
|
||||||
CTG_RET(ctgAddBatch(pCtg, 0, pConn, tReq, reqType, msg, msgLen));
|
CTG_RET(ctgAddBatch(pCtg, 0, pConn, tReq, reqType, msg, msgLen));
|
||||||
#else
|
#else
|
||||||
|
@ -1131,8 +1134,8 @@ int32_t ctgGetTbMetaFromMnode(SCatalog* pCtg, SRequestConnInfo* pConn, const SNa
|
||||||
|
|
||||||
int32_t ctgGetTbMetaFromVnode(SCatalog* pCtg, SRequestConnInfo* pConn, const SName* pTableName, SVgroupInfo* vgroupInfo,
|
int32_t ctgGetTbMetaFromVnode(SCatalog* pCtg, SRequestConnInfo* pConn, const SName* pTableName, SVgroupInfo* vgroupInfo,
|
||||||
STableMetaOutput* out, SCtgTaskReq* tReq) {
|
STableMetaOutput* out, SCtgTaskReq* tReq) {
|
||||||
SCtgTask *pTask = tReq ? tReq->pTask : NULL;
|
SCtgTask* pTask = tReq ? tReq->pTask : NULL;
|
||||||
char dbFName[TSDB_DB_FNAME_LEN];
|
char dbFName[TSDB_DB_FNAME_LEN];
|
||||||
tNameGetFullDbName(pTableName, dbFName);
|
tNameGetFullDbName(pTableName, dbFName);
|
||||||
int32_t reqType = TDMT_VND_TABLE_META;
|
int32_t reqType = TDMT_VND_TABLE_META;
|
||||||
char tbFName[TSDB_TABLE_FNAME_LEN];
|
char tbFName[TSDB_TABLE_FNAME_LEN];
|
||||||
|
@ -1165,7 +1168,7 @@ int32_t ctgGetTbMetaFromVnode(SCatalog* pCtg, SRequestConnInfo* pConn, const SNa
|
||||||
.requestObjRefId = pConn->requestObjRefId,
|
.requestObjRefId = pConn->requestObjRefId,
|
||||||
.mgmtEps = vgroupInfo->epSet};
|
.mgmtEps = vgroupInfo->epSet};
|
||||||
|
|
||||||
CTG_ERR_RET(ctgUpdateMsgCtx(CTG_GET_TASK_MSGCTX(pTask, tReq->msgIdx), reqType, pOut, tbFName));
|
CTG_ERR_RET(ctgUpdateMsgCtx(CTG_GET_TASK_MSGCTX(pTask, tReq->msgIdx), reqType, pOut, tbFName));
|
||||||
|
|
||||||
#if CTG_BATCH_FETCH
|
#if CTG_BATCH_FETCH
|
||||||
CTG_RET(ctgAddBatch(pCtg, vgroupInfo->vgId, &vConn, tReq, reqType, msg, msgLen));
|
CTG_RET(ctgAddBatch(pCtg, vgroupInfo->vgId, &vConn, tReq, reqType, msg, msgLen));
|
||||||
|
@ -1231,7 +1234,7 @@ int32_t ctgGetTableCfgFromVnode(SCatalog* pCtg, SRequestConnInfo* pConn, const S
|
||||||
#if CTG_BATCH_FETCH
|
#if CTG_BATCH_FETCH
|
||||||
SCtgTaskReq tReq;
|
SCtgTaskReq tReq;
|
||||||
tReq.pTask = pTask;
|
tReq.pTask = pTask;
|
||||||
tReq.msgIdx = -1;
|
tReq.msgIdx = -1;
|
||||||
CTG_RET(ctgAddBatch(pCtg, vgroupInfo->vgId, &vConn, &tReq, reqType, msg, msgLen));
|
CTG_RET(ctgAddBatch(pCtg, vgroupInfo->vgId, &vConn, &tReq, reqType, msg, msgLen));
|
||||||
#else
|
#else
|
||||||
SCtgTbCfgCtx* ctx = (SCtgTbCfgCtx*)pTask->taskCtx;
|
SCtgTbCfgCtx* ctx = (SCtgTbCfgCtx*)pTask->taskCtx;
|
||||||
|
@ -1243,7 +1246,8 @@ int32_t ctgGetTableCfgFromVnode(SCatalog* pCtg, SRequestConnInfo* pConn, const S
|
||||||
}
|
}
|
||||||
taosArrayPush(pTaskId, &pTask->taskId);
|
taosArrayPush(pTaskId, &pTask->taskId);
|
||||||
|
|
||||||
CTG_RET(ctgAsyncSendMsg(pCtg, &vConn, pTask->pJob, pTaskId, -1, NULL, dbFName, ctx->pVgInfo->vgId, reqType, msg, msgLen));
|
CTG_RET(ctgAsyncSendMsg(pCtg, &vConn, pTask->pJob, pTaskId, -1, NULL, dbFName, ctx->pVgInfo->vgId, reqType, msg,
|
||||||
|
msgLen));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1289,7 +1293,7 @@ int32_t ctgGetTableCfgFromMnode(SCatalog* pCtg, SRequestConnInfo* pConn, const S
|
||||||
#if CTG_BATCH_FETCH
|
#if CTG_BATCH_FETCH
|
||||||
SCtgTaskReq tReq;
|
SCtgTaskReq tReq;
|
||||||
tReq.pTask = pTask;
|
tReq.pTask = pTask;
|
||||||
tReq.msgIdx = -1;
|
tReq.msgIdx = -1;
|
||||||
CTG_RET(ctgAddBatch(pCtg, 0, pConn, &tReq, reqType, msg, msgLen));
|
CTG_RET(ctgAddBatch(pCtg, 0, pConn, &tReq, reqType, msg, msgLen));
|
||||||
#else
|
#else
|
||||||
SArray* pTaskId = taosArrayInit(1, sizeof(int32_t));
|
SArray* pTaskId = taosArrayInit(1, sizeof(int32_t));
|
||||||
|
@ -1338,7 +1342,7 @@ int32_t ctgGetSvrVerFromMnode(SCatalog* pCtg, SRequestConnInfo* pConn, char** ou
|
||||||
#if CTG_BATCH_FETCH
|
#if CTG_BATCH_FETCH
|
||||||
SCtgTaskReq tReq;
|
SCtgTaskReq tReq;
|
||||||
tReq.pTask = pTask;
|
tReq.pTask = pTask;
|
||||||
tReq.msgIdx = -1;
|
tReq.msgIdx = -1;
|
||||||
CTG_RET(ctgAddBatch(pCtg, 0, pConn, &tReq, reqType, msg, msgLen));
|
CTG_RET(ctgAddBatch(pCtg, 0, pConn, &tReq, reqType, msg, msgLen));
|
||||||
#else
|
#else
|
||||||
SArray* pTaskId = taosArrayInit(1, sizeof(int32_t));
|
SArray* pTaskId = taosArrayInit(1, sizeof(int32_t));
|
||||||
|
|
|
@ -384,8 +384,7 @@ _return:
|
||||||
taosMemoryFreeClear(msg);
|
taosMemoryFreeClear(msg);
|
||||||
|
|
||||||
SCH_RET(schProcessOnTaskFailure(pJob, pTask, code));
|
SCH_RET(schProcessOnTaskFailure(pJob, pTask, code));
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t schHandleCallback(void *param, SDataBuf *pMsg, int32_t rspCode) {
|
int32_t schHandleCallback(void *param, SDataBuf *pMsg, int32_t rspCode) {
|
||||||
int32_t code = 0;
|
int32_t code = 0;
|
||||||
SSchTaskCallbackParam *pParam = (SSchTaskCallbackParam *)param;
|
SSchTaskCallbackParam *pParam = (SSchTaskCallbackParam *)param;
|
||||||
|
|
|
@ -1498,9 +1498,7 @@ int transSendRequest(void* shandle, const SEpSet* pEpSet, STransMsg* pReq, STran
|
||||||
pCtx->ahandle = pReq->info.ahandle;
|
pCtx->ahandle = pReq->info.ahandle;
|
||||||
pCtx->msgType = pReq->msgType;
|
pCtx->msgType = pReq->msgType;
|
||||||
|
|
||||||
if (ctx != NULL) {
|
if (ctx != NULL) pCtx->appCtx = *ctx;
|
||||||
pCtx->appCtx = *ctx;
|
|
||||||
}
|
|
||||||
|
|
||||||
SCliMsg* cliMsg = taosMemoryCalloc(1, sizeof(SCliMsg));
|
SCliMsg* cliMsg = taosMemoryCalloc(1, sizeof(SCliMsg));
|
||||||
cliMsg->ctx = pCtx;
|
cliMsg->ctx = pCtx;
|
||||||
|
|
|
@ -1148,6 +1148,7 @@ int transReleaseSrvHandle(void* handle) {
|
||||||
|
|
||||||
tTrace("%s conn %p start to release", transLabel(pThrd->pTransInst), exh->handle);
|
tTrace("%s conn %p start to release", transLabel(pThrd->pTransInst), exh->handle);
|
||||||
transAsyncSend(pThrd->asyncPool, &m->q);
|
transAsyncSend(pThrd->asyncPool, &m->q);
|
||||||
|
|
||||||
transReleaseExHandle(transGetRefMgt(), refId);
|
transReleaseExHandle(transGetRefMgt(), refId);
|
||||||
return 0;
|
return 0;
|
||||||
_return1:
|
_return1:
|
||||||
|
@ -1177,8 +1178,10 @@ int transSendResponse(const STransMsg* msg) {
|
||||||
STraceId* trace = (STraceId*)&msg->info.traceId;
|
STraceId* trace = (STraceId*)&msg->info.traceId;
|
||||||
tGTrace("conn %p start to send resp (1/2)", exh->handle);
|
tGTrace("conn %p start to send resp (1/2)", exh->handle);
|
||||||
transAsyncSend(pThrd->asyncPool, &m->q);
|
transAsyncSend(pThrd->asyncPool, &m->q);
|
||||||
|
|
||||||
transReleaseExHandle(transGetRefMgt(), refId);
|
transReleaseExHandle(transGetRefMgt(), refId);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
_return1:
|
_return1:
|
||||||
tTrace("handle %p failed to send resp", exh);
|
tTrace("handle %p failed to send resp", exh);
|
||||||
rpcFreeCont(msg->pCont);
|
rpcFreeCont(msg->pCont);
|
||||||
|
@ -1207,6 +1210,7 @@ int transRegisterMsg(const STransMsg* msg) {
|
||||||
STrans* pTransInst = pThrd->pTransInst;
|
STrans* pTransInst = pThrd->pTransInst;
|
||||||
tTrace("%s conn %p start to register brokenlink callback", transLabel(pTransInst), exh->handle);
|
tTrace("%s conn %p start to register brokenlink callback", transLabel(pTransInst), exh->handle);
|
||||||
transAsyncSend(pThrd->asyncPool, &m->q);
|
transAsyncSend(pThrd->asyncPool, &m->q);
|
||||||
|
|
||||||
transReleaseExHandle(transGetRefMgt(), refId);
|
transReleaseExHandle(transGetRefMgt(), refId);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue