1. fix exchange operator dead lock due to no ret check for add ref
2. fix null pointer of FetchRpcHandle of exchangeoperator
This commit is contained in:
parent
d6b3b3b49f
commit
efd1ece152
|
@ -391,7 +391,11 @@ static int32_t initExchangeOperator(SExchangePhysiNode* pExNode, SExchangeInfo*
|
|||
|
||||
initLimitInfo(pExNode->node.pLimit, pExNode->node.pSlimit, &pInfo->limitInfo);
|
||||
pInfo->self = taosAddRef(exchangeObjRefPool, pInfo);
|
||||
|
||||
if (pInfo->self < 0) {
|
||||
int32_t code = terrno;
|
||||
qError("%s failed at line %d since %s", __func__, __LINE__, tstrerror(code));
|
||||
return code;
|
||||
}
|
||||
|
||||
return initDataSource(numOfSources, pInfo, id);
|
||||
}
|
||||
|
@ -480,6 +484,7 @@ void freeSourceDataInfo(void* p) {
|
|||
|
||||
void doDestroyExchangeOperatorInfo(void* param) {
|
||||
SExchangeInfo* pExInfo = (SExchangeInfo*)param;
|
||||
if (pExInfo->pFetchRpcHandles) {
|
||||
for (int32_t i = 0; i < pExInfo->pFetchRpcHandles->size; ++i) {
|
||||
int64_t* pRpcHandle = taosArrayGet(pExInfo->pFetchRpcHandles, i);
|
||||
if (*pRpcHandle > 0) {
|
||||
|
@ -488,6 +493,7 @@ void doDestroyExchangeOperatorInfo(void* param) {
|
|||
}
|
||||
}
|
||||
taosArrayDestroy(pExInfo->pFetchRpcHandles);
|
||||
}
|
||||
|
||||
taosArrayDestroy(pExInfo->pSources);
|
||||
taosArrayDestroyEx(pExInfo->pSourceDataInfo, freeSourceDataInfo);
|
||||
|
|
Loading…
Reference in New Issue