From 7e7572cd8aeb7db60bfdca81d416a0d6e6e59de3 Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Fri, 13 Dec 2024 17:44:26 +0800 Subject: [PATCH] not update auxiliaried ts to none --- source/dnode/vnode/src/tsdb/tsdbCache.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbCache.c b/source/dnode/vnode/src/tsdb/tsdbCache.c index 2f61549d18..72d22b8cf2 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCache.c +++ b/source/dnode/vnode/src/tsdb/tsdbCache.c @@ -1545,8 +1545,8 @@ static int32_t tsdbCacheLoadFromRaw(STsdb *pTsdb, tb_uid_t uid, SArray *pLastArr SIdxKey *idxKey = taosArrayGet(remainCols, 0); if (idxKey->key.cid != PRIMARYKEY_TIMESTAMP_COL_ID) { // ignore 'ts' loaded from cache and load it from tsdb - SLastCol *pLastCol = taosArrayGet(pLastArray, 0); - tsdbCacheUpdateLastColToNone(pLastCol, TSDB_LAST_CACHE_NO_CACHE); + // SLastCol *pLastCol = taosArrayGet(pLastArray, 0); + // tsdbCacheUpdateLastColToNone(pLastCol, TSDB_LAST_CACHE_NO_CACHE); SLastKey *key = &(SLastKey){.lflag = ltype, .uid = uid, .cid = PRIMARYKEY_TIMESTAMP_COL_ID}; if (!taosArrayInsert(remainCols, 0, &(SIdxKey){0, *key})) { @@ -1660,7 +1660,9 @@ static int32_t tsdbCacheLoadFromRaw(STsdb *pTsdb, tb_uid_t uid, SArray *pLastArr pLastCol = &noneCol; } - taosArraySet(pLastArray, idxKey->idx, pLastCol); + if (!extraTS || i > 0) { + taosArraySet(pLastArray, idxKey->idx, pLastCol); + } // taosArrayRemove(remainCols, i); if (/*!pTmpColArray*/ lastTmpIndexArray && !lastTmpColArray) {