From 280bb372705d5e10015461c0d5a5c9f647633cd9 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sat, 3 Sep 2022 23:06:39 +0800 Subject: [PATCH] fix(query): reset fileIter when reset tsdb reader. --- source/dnode/vnode/src/tsdb/tsdbRead.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbRead.c b/source/dnode/vnode/src/tsdb/tsdbRead.c index 7133ec1717..fd61935aea 100644 --- a/source/dnode/vnode/src/tsdb/tsdbRead.c +++ b/source/dnode/vnode/src/tsdb/tsdbRead.c @@ -337,13 +337,16 @@ static int32_t initFilesetIterator(SFilesetIter* pIter, SArray* aDFileSet, tsdbError("failed to prepare the last block iterator, code:%d %s", tstrerror(code), pReader->idStr); return code; } - - SLastBlockReader* pLReader = pIter->pLastBlockReader; - pLReader->order = pReader->order; - pLReader->window = pReader->window; - pLReader->verRange = pReader->verRange; } + SLastBlockReader* pLReader = pIter->pLastBlockReader; + pLReader->order = pReader->order; + pLReader->window = pReader->window; + pLReader->verRange = pReader->verRange; + + pLReader->uid = 0; + tMergeTreeClose(&pLReader->mergeTree); + tsdbDebug("init fileset iterator, total files:%d %s", pIter->numOfFiles, pReader->idStr); return TSDB_CODE_SUCCESS; } -- GitLab