diff --git a/source/dnode/vnode/src/tsdb/tsdbRead.c b/source/dnode/vnode/src/tsdb/tsdbRead.c index 7717a2371b35d403d55234e86b9ac95c5a558145..a4581f54724a58ea93d6df69bbfe396c058e49a2 100644 --- a/source/dnode/vnode/src/tsdb/tsdbRead.c +++ b/source/dnode/vnode/src/tsdb/tsdbRead.c @@ -2483,12 +2483,11 @@ static int32_t buildComposedDataBlock(STsdbReader* pReader) { SBlockIndex bIndex = {0}; bool hasNeighbor = getNeighborBlockOfSameTable(pBlockInfo, pBlockScanInfo, &nextIndex, pReader->order, &bIndex); if (!hasNeighbor) { // do nothing - return 0; + setBlockAllDumped(pDumpInfo, pBlock->maxKey.ts, pReader->order); + break; } - bool overlap = overlapWithNeighborBlock(pBlock, &bIndex, pReader->order); - - if (overlap) { // load next block + if (overlapWithNeighborBlock(pBlock, &bIndex, pReader->order)) { // load next block SReaderStatus* pStatus = &pReader->status; SDataBlockIter* pBlockIter = &pStatus->blockIter; @@ -2502,15 +2501,16 @@ static int32_t buildComposedDataBlock(STsdbReader* pReader) { // 3. load the neighbor block, and set it to be the currently accessed file data block code = doLoadFileBlockData(pReader, pBlockIter, &pStatus->fileBlockData, pBlockInfo->uid); if (code != TSDB_CODE_SUCCESS) { - return code; + setBlockAllDumped(pDumpInfo, pBlock->maxKey.ts, pReader->order); + break; } // 4. check the data values initBlockDumpInfo(pReader, pBlockIter); + } else { + setBlockAllDumped(pDumpInfo, pBlock->maxKey.ts, pReader->order); + break; } - - setBlockAllDumped(pDumpInfo, pBlock->maxKey.ts, pReader->order); - break; } } }