提交 29b2f328 编写于 作者: M Minglei Jin

cache reader: cleanup stt init

上级 7d294cac
...@@ -181,14 +181,6 @@ int32_t tsdbCacherowsReaderOpen(void* pVnode, int32_t type, void* pTableIdList, ...@@ -181,14 +181,6 @@ int32_t tsdbCacherowsReaderOpen(void* pVnode, int32_t type, void* pTableIdList,
} }
} }
SVnodeCfg* pCfg = &((SVnode*)pVnode)->config;
int32_t numOfStt = pCfg->sttTrigger;
p->pLDataIterArray = taosArrayInit(4, POINTER_BYTES);
if (p->pLDataIterArray == NULL) {
tsdbCacherowsReaderClose(p);
return TSDB_CODE_OUT_OF_MEMORY;
}
p->idstr = taosStrdup(idstr); p->idstr = taosStrdup(idstr);
taosThreadMutexInit(&p->readerMutex, NULL); taosThreadMutexInit(&p->readerMutex, NULL);
...@@ -215,9 +207,11 @@ void* tsdbCacherowsReaderClose(void* pReader) { ...@@ -215,9 +207,11 @@ void* tsdbCacherowsReaderClose(void* pReader) {
taosMemoryFree(p->pCurrSchema); taosMemoryFree(p->pCurrSchema);
int64_t loadBlocks = 0; if (p->pLDataIterArray) {
double elapse = 0; int64_t loadBlocks = 0;
destroySttBlockReader(p->pLDataIterArray, &loadBlocks, &elapse); double elapse = 0;
destroySttBlockReader(p->pLDataIterArray, &loadBlocks, &elapse);
}
if (p->pFileReader) { if (p->pFileReader) {
tsdbDataFileReaderClose(&p->pFileReader); tsdbDataFileReaderClose(&p->pFileReader);
...@@ -443,11 +437,6 @@ int32_t tsdbRetrieveCacheRows(void* pReader, SSDataBlock* pResBlock, const int32 ...@@ -443,11 +437,6 @@ int32_t tsdbRetrieveCacheRows(void* pReader, SSDataBlock* pResBlock, const int32
_end: _end:
tsdbUntakeReadSnap2((STsdbReader*)pr, pr->pReadSnap, true); tsdbUntakeReadSnap2((STsdbReader*)pr, pr->pReadSnap, true);
int64_t loadBlocks = 0;
double elapse = 0;
pr->pLDataIterArray = destroySttBlockReader(pr->pLDataIterArray, &loadBlocks, &elapse);
pr->pLDataIterArray = taosArrayInit(4, POINTER_BYTES);
taosThreadMutexUnlock(&pr->readerMutex); taosThreadMutexUnlock(&pr->readerMutex);
if (pRes != NULL) { if (pRes != NULL) {
...@@ -457,7 +446,6 @@ _end: ...@@ -457,7 +446,6 @@ _end:
} }
taosMemoryFree(pRes); taosMemoryFree(pRes);
// taosArrayDestroyEx(pRow, freeItem);
taosArrayDestroy(pRow); taosArrayDestroy(pRow);
taosArrayDestroyEx(pLastCols, freeItem); taosArrayDestroyEx(pLastCols, freeItem);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册