fix: memory issue

This commit is contained in:
dapan1121 2023-08-14 09:06:21 +08:00
parent c9656d3f77
commit b4b9a12d61
5 changed files with 7 additions and 5 deletions

View File

@ -373,6 +373,7 @@ static int32_t buildSingleTableScanOperatorParam(SOperatorParam** ppRes, int32_t
taosArrayPush(pUidList, pUid);
int32_t code = buildTableScanOperatorParam(ppRes, pUidList, QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN, true);
taosArrayDestroy(pUidList);
if (code) {
return code;
}

View File

@ -121,8 +121,8 @@ static void freeGcBlockInList(void* p) {
static void freeSGcDownstreamCtx(SGcDownstreamCtx* pCtx) {
taosArrayDestroy(pCtx->pNewGrpList);
tSimpleHashCleanup(pCtx->pVgTbHash);
taosHashCleanup(pCtx->pGrpHash);
tSimpleHashCleanup(pCtx->pVgTbHash);
taosArrayDestroyEx(pCtx->pFreeBlock, freeGcBlockInList);
taosHashCleanup(pCtx->pSessions);
@ -1180,7 +1180,7 @@ static int32_t initGroupCacheExecInfo(SOperatorInfo* pOperator) {
static void freeRemoveGroupCacheData(void* p) {
SGroupCacheData* pGroup = p;
if (pGroup->vgId > 0) {
if (pGroup->vgId > 0 && pGroup->needCache) {
SGcFileCacheCtx* pFileCtx = &pGroup->pVgCtx->fileCtx;
if (pGroup->fileId >= 0) {
SGroupCacheFileInfo* pFileInfo = taosHashGet(pFileCtx->pCacheFile, &pGroup->fileId, sizeof(pGroup->fileId));

View File

@ -754,6 +754,7 @@ int32_t optrDefaultNotifyFn(struct SOperatorInfo* pOperator, SOperatorParam* pPa
if (TSDB_CODE_SUCCESS != code) {
break;
}
pOperator->pDownstreamNotifyParams[i] = NULL;
}
}
}

View File

@ -1026,7 +1026,7 @@ query_specification(A) ::=
%type hint_opt { SQueryHint }
%destructor hint_opt { }
hint_opt(A) ::= . { A.withHint = false; }
hint_opt(A) ::= NO_BATCH_SCAN. { A.withHint = true; A.batchScan = false; }
hint_opt(A) ::= NO_BATCH_SCAN NK_LP NK_RP. { A.withHint = true; A.batchScan = false; }
%type set_quantifier_opt { bool }
%destructor set_quantifier_opt { }

View File

@ -3338,7 +3338,7 @@ static int32_t stbJoinOptCreateGroupCacheNode(SNodeList* pChildren, SLogicNode**
//pGrpCache->node.dynamicOp = true;
pGrpCache->grpColsMayBeNull = false;
pGrpCache->grpByUid = true;
pGrpCache->batchFetch = true;
pGrpCache->batchFetch = false;
pGrpCache->node.pChildren = pChildren;
pGrpCache->node.pTargets = nodesMakeList();
if (NULL == pGrpCache->node.pTargets) {
@ -3444,7 +3444,7 @@ static int32_t stbJoinOptCreateDynQueryCtrlNode(SLogicNode* pPrev, SLogicNode* p
}
pDynCtrl->qType = DYN_QTYPE_STB_HASH;
pDynCtrl->stbJoin.batchFetch = true;
pDynCtrl->stbJoin.batchFetch = false;
memcpy(pDynCtrl->stbJoin.srcScan, srcScan, sizeof(pDynCtrl->stbJoin.srcScan));
if (TSDB_CODE_SUCCESS == code) {