From cc9b9bd0b998386c72b391ed9728dab684c93916 Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Thu, 27 Jul 2023 17:19:42 +0800 Subject: [PATCH] fix(tsdb/cache): move to stt next row if data file exausted --- source/dnode/vnode/src/tsdb/tsdbCache.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbCache.c b/source/dnode/vnode/src/tsdb/tsdbCache.c index a01c6a8a9e..df6cc1b5e7 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCache.c +++ b/source/dnode/vnode/src/tsdb/tsdbCache.c @@ -2074,7 +2074,14 @@ static int32_t getNextRowFromFS(void *iter, TSDBROW **ppRow, bool *pIgnoreEarlie if (SFSNEXTROW_INDEXLIST == state->state) { SBrinBlk *pBrinBlk = NULL; _next_brinindex: - if (--state->iBrinIndex < 0) { // no index left, goto next fileset + if (--state->iBrinIndex < 0) { + if (state->pLastRow) { + state->state = SFSNEXTROW_NEXTSTTROW; + *ppRow = state->pLastRow; + state->pLastRow = NULL; + return code; + } + clearLastFileSet(state); goto _next_fileset; } else {