提交 ab94dafe 编写于 作者: L Liu Jicong

optimize block cache

上级 7bcb5992
......@@ -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 {
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册