From 17f05c0020c2b285dd5d928ed4260081f36cccb9 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Fri, 10 Feb 2023 14:40:37 +0800 Subject: [PATCH] refactor: disable the limitation of maximum buffer size. --- source/dnode/vnode/src/tsdb/tsdbRead.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbRead.c b/source/dnode/vnode/src/tsdb/tsdbRead.c index af3da87b17..b8d0ea28da 100644 --- a/source/dnode/vnode/src/tsdb/tsdbRead.c +++ b/source/dnode/vnode/src/tsdb/tsdbRead.c @@ -423,7 +423,9 @@ static STimeWindow updateQueryTimeWindow(STsdb* pTsdb, STimeWindow* pWindow) { return win; } +// note: currently not need this limitation static void limitOutputBufferSize(const SQueryTableDataCond* pCond, int32_t* capacity) { +#if 0 int32_t rowLen = 0; for (int32_t i = 0; i < pCond->numOfCols; ++i) { rowLen += pCond->colList[i].bytes; @@ -434,6 +436,7 @@ static void limitOutputBufferSize(const SQueryTableDataCond* pCond, int32_t* cap if ((*capacity) * rowLen > TWOMB) { (*capacity) = TWOMB / rowLen; } +#endif } // init file iterator @@ -618,7 +621,6 @@ static int32_t tsdbReaderCreate(SVnode* pVnode, SQueryTableDataCond* pCond, STsd goto _end; } - // todo refactor. limitOutputBufferSize(pCond, &pReader->capacity); // allocate buffer in order to load data blocks from file -- GitLab