From ab94dafed407e88309cd6d3edffbde5a8e0cc133 Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Fri, 23 Sep 2022 11:37:50 +0800 Subject: [PATCH] optimize block cache --- source/libs/executor/src/executor.c | 4 +++- source/libs/executor/src/scanoperator.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/source/libs/executor/src/executor.c b/source/libs/executor/src/executor.c index 8d2c66ff90..be8bdf7308 100644 --- a/source/libs/executor/src/executor.c +++ b/source/libs/executor/src/executor.c @@ -84,15 +84,17 @@ static int32_t doSetStreamBlock(SOperatorInfo* pOperator, void* input, size_t nu } else if (type == STREAM_INPUT__DATA_BLOCK) { for (int32_t i = 0; i < numOfBlocks; ++i) { SSDataBlock* pDataBlock = &((SSDataBlock*)input)[i]; + taosArrayPush(pInfo->pBlockLists, &pDataBlock); +#if 0 // TODO optimize SSDataBlock* p = createOneDataBlock(pDataBlock, false); - /*qError("alloc p i, %d %p", i, p);*/ p->info = pDataBlock->info; taosArrayClear(p->pDataBlock); taosArrayAddAll(p->pDataBlock, pDataBlock->pDataBlock); taosArrayPush(pInfo->pBlockLists, &p); +#endif } pInfo->blockType = STREAM_INPUT__DATA_BLOCK; } else { diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index 56fbb21309..6c5c33ae29 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -920,6 +920,7 @@ _error: } static void doClearBufferedBlocks(SStreamScanInfo* pInfo) { +#if 0 if (pInfo->blockType == STREAM_INPUT__DATA_BLOCK) { size_t total = taosArrayGetSize(pInfo->pBlockLists); for (int32_t i = 0; i < total; i++) { @@ -928,6 +929,7 @@ static void doClearBufferedBlocks(SStreamScanInfo* pInfo) { taosMemoryFree(p); } } +#endif taosArrayClear(pInfo->pBlockLists); pInfo->validBlockIndex = 0; #if 0 -- GitLab