diff --git a/source/dnode/vnode/src/tsdb/tsdbMergeTree.c b/source/dnode/vnode/src/tsdb/tsdbMergeTree.c index 14c1d32b01242e2a6999593c4eda0f0d7947d47d..5ccbc3e33bc392932134b84ab4600f680b24303f 100644 --- a/source/dnode/vnode/src/tsdb/tsdbMergeTree.c +++ b/source/dnode/vnode/src/tsdb/tsdbMergeTree.c @@ -392,12 +392,9 @@ static bool existsFromSttBlkStatis(const TStatisBlkArray *pStatisBlkArray, uint6 tsdbSttFileReadStatisBlock(pReader, p, &block); int32_t index = tarray2SearchIdx(block.uid, &uid, sizeof(int64_t), uidComparFn, TD_EQ); - if (index == -1) { // has record, continue. - tStatisBlockDestroy(&block); - return false; - } + tStatisBlockDestroy(&block); - return true; + return (index != -1); } int32_t tLDataIterOpen2(struct SLDataIter *pIter, SSttFileReader *pSttFileReader, int32_t iStt, int8_t backward,