From 3a5542bbbc81ab744c712b1c152f7491b56f6912 Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Sun, 19 Mar 2023 10:19:49 +0800 Subject: [PATCH] fix(tsdb/cache): update nCols of merge tree to avoid assert failed --- source/dnode/vnode/src/tsdb/tsdbCache.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/dnode/vnode/src/tsdb/tsdbCache.c b/source/dnode/vnode/src/tsdb/tsdbCache.c index e4c059b235..3d01184e78 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCache.c +++ b/source/dnode/vnode/src/tsdb/tsdbCache.c @@ -658,6 +658,9 @@ static int32_t getNextRowFromFSLast(void *iter, TSDBROW **ppRow, bool *pIgnoreEa bool hasVal = false; state->row = tMergeTreeGetRow(&state->mergeTree); *ppRow = &state->row; + if (nCols != state->pLoadInfo->numOfCols) { + state->pLoadInfo->numOfCols = nCols; + } hasVal = tMergeTreeNext(&state->mergeTree); if (TSDBROW_TS(&state->row) <= state->lastTs) { *pIgnoreEarlierTs = true; -- GitLab