refactor: disable the limitation of maximum buffer size.

This commit is contained in:
Haojun Liao 2023-02-10 14:40:37 +08:00
parent 4908c563cc
commit 17f05c0020
1 changed files with 3 additions and 1 deletions

View File

@ -423,7 +423,9 @@ static STimeWindow updateQueryTimeWindow(STsdb* pTsdb, STimeWindow* pWindow) {
return win; return win;
} }
// note: currently not need this limitation
static void limitOutputBufferSize(const SQueryTableDataCond* pCond, int32_t* capacity) { static void limitOutputBufferSize(const SQueryTableDataCond* pCond, int32_t* capacity) {
#if 0
int32_t rowLen = 0; int32_t rowLen = 0;
for (int32_t i = 0; i < pCond->numOfCols; ++i) { for (int32_t i = 0; i < pCond->numOfCols; ++i) {
rowLen += pCond->colList[i].bytes; rowLen += pCond->colList[i].bytes;
@ -434,6 +436,7 @@ static void limitOutputBufferSize(const SQueryTableDataCond* pCond, int32_t* cap
if ((*capacity) * rowLen > TWOMB) { if ((*capacity) * rowLen > TWOMB) {
(*capacity) = TWOMB / rowLen; (*capacity) = TWOMB / rowLen;
} }
#endif
} }
// init file iterator // init file iterator
@ -618,7 +621,6 @@ static int32_t tsdbReaderCreate(SVnode* pVnode, SQueryTableDataCond* pCond, STsd
goto _end; goto _end;
} }
// todo refactor.
limitOutputBufferSize(pCond, &pReader->capacity); limitOutputBufferSize(pCond, &pReader->capacity);
// allocate buffer in order to load data blocks from file // allocate buffer in order to load data blocks from file