From bfcc5382054d7ff3e536b10ac3be4335ccf8fe11 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 20 Jul 2023 00:01:30 +0800 Subject: [PATCH] fix(tsdb):disable stt statistics. --- source/dnode/vnode/src/tsdb/tsdbMergeTree.c | 34 ++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbMergeTree.c b/source/dnode/vnode/src/tsdb/tsdbMergeTree.c index 5ccbc3e33b..b79b5c908d 100644 --- a/source/dnode/vnode/src/tsdb/tsdbMergeTree.c +++ b/source/dnode/vnode/src/tsdb/tsdbMergeTree.c @@ -367,21 +367,21 @@ static bool existsFromSttBlkStatis(const TStatisBlkArray *pStatisBlkArray, uint6 int32_t i = 0; for (i = 0; i < TARRAY2_SIZE(pStatisBlkArray); ++i) { SStatisBlk *p = &pStatisBlkArray->data[i]; - if (p->minTbid.suid == suid) { + if (p->minTbid.suid <= suid && p->maxTbid.suid >= suid) { break; } } - for (; i < TARRAY2_SIZE(pStatisBlkArray); ++i) { - SStatisBlk *p = &pStatisBlkArray->data[i]; - if (p->minTbid.uid <= uid && p->maxTbid.uid >= uid) { - break; - } - - if (p->maxTbid.uid < uid) { - break; - } - } +// for (; i < TARRAY2_SIZE(pStatisBlkArray); ++i) { +// SStatisBlk *p = &pStatisBlkArray->data[i]; +// if (p->minTbid.uid <= uid && p->maxTbid.uid >= uid) { +// break; +// } +// +// if (p->maxTbid.uid < uid) { +// break; +// } +// } if (i >= TARRAY2_SIZE(pStatisBlkArray)) { return false; @@ -445,12 +445,12 @@ int32_t tLDataIterOpen2(struct SLDataIter *pIter, SSttFileReader *pSttFileReader tsdbDebug("load the stt file info completed, elapsed time:%.2fms, %s", el, idStr); } - bool exists = existsFromSttBlkStatis(pBlockLoadInfo->pSttStatisBlkArray, suid, uid, pIter->pReader); - if (!exists) { - pIter->iSttBlk = -1; - pIter->pSttBlk = NULL; - return TSDB_CODE_SUCCESS; - } +// bool exists = existsFromSttBlkStatis(pBlockLoadInfo->pSttStatisBlkArray, suid, uid, pIter->pReader); +// if (!exists) { +// pIter->iSttBlk = -1; +// pIter->pSttBlk = NULL; +// return TSDB_CODE_SUCCESS; +// } // find the start block, actually we could load the position to avoid repeatly searching for the start position when // the skey is updated. -- GitLab