handle mem failure
This commit is contained in:
parent
69b36fee44
commit
52f9ea5963
|
@ -3219,6 +3219,7 @@ int32_t transSendRequestWithId(void* pInstRef, const SEpSet* pEpSet, STransMsg*
|
||||||
return TSDB_CODE_INVALID_PARA;
|
return TSDB_CODE_INVALID_PARA;
|
||||||
}
|
}
|
||||||
int32_t code = 0;
|
int32_t code = 0;
|
||||||
|
int8_t transIdInited = 0;
|
||||||
|
|
||||||
STrans* pInst = (STrans*)transAcquireExHandle(transGetInstMgt(), (int64_t)pInstRef);
|
STrans* pInst = (STrans*)transAcquireExHandle(transGetInstMgt(), (int64_t)pInstRef);
|
||||||
if (pInst == NULL) {
|
if (pInst == NULL) {
|
||||||
|
@ -3236,6 +3237,7 @@ int32_t transSendRequestWithId(void* pInstRef, const SEpSet* pEpSet, STransMsg*
|
||||||
if (exh == NULL) {
|
if (exh == NULL) {
|
||||||
TAOS_CHECK_GOTO(TSDB_CODE_RPC_MODULE_QUIT, NULL, _exception);
|
TAOS_CHECK_GOTO(TSDB_CODE_RPC_MODULE_QUIT, NULL, _exception);
|
||||||
}
|
}
|
||||||
|
transIdInited = 1;
|
||||||
|
|
||||||
pReq->info.handle = (void*)(*transpointId);
|
pReq->info.handle = (void*)(*transpointId);
|
||||||
pReq->info.qId = *transpointId;
|
pReq->info.qId = *transpointId;
|
||||||
|
@ -3252,9 +3254,6 @@ int32_t transSendRequestWithId(void* pInstRef, const SEpSet* pEpSet, STransMsg*
|
||||||
return (code == TSDB_CODE_RPC_ASYNC_MODULE_QUIT ? TSDB_CODE_RPC_MODULE_QUIT : code);
|
return (code == TSDB_CODE_RPC_ASYNC_MODULE_QUIT ? TSDB_CODE_RPC_MODULE_QUIT : code);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (pReq->msgType == TDMT_SCH_DROP_TASK) {
|
|
||||||
// TAOS_UNUSED(transReleaseCliHandle(pReq->info.handle));
|
|
||||||
// }
|
|
||||||
transReleaseExHandle(transGetRefMgt(), *transpointId);
|
transReleaseExHandle(transGetRefMgt(), *transpointId);
|
||||||
transReleaseExHandle(transGetInstMgt(), (int64_t)pInstRef);
|
transReleaseExHandle(transGetInstMgt(), (int64_t)pInstRef);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -3262,6 +3261,7 @@ int32_t transSendRequestWithId(void* pInstRef, const SEpSet* pEpSet, STransMsg*
|
||||||
_exception:
|
_exception:
|
||||||
transFreeMsg(pReq->pCont);
|
transFreeMsg(pReq->pCont);
|
||||||
pReq->pCont = NULL;
|
pReq->pCont = NULL;
|
||||||
|
if (transIdInited) transReleaseExHandle(transGetRefMgt(), *transpointId);
|
||||||
transReleaseExHandle(transGetInstMgt(), (int64_t)pInstRef);
|
transReleaseExHandle(transGetInstMgt(), (int64_t)pInstRef);
|
||||||
|
|
||||||
tError("failed to send request since %s", tstrerror(code));
|
tError("failed to send request since %s", tstrerror(code));
|
||||||
|
|
Loading…
Reference in New Issue