提交 114943dd 编写于 作者: H Haojun Liao

fix(query): set the correct flag when no neighbors exist.

上级 d5b49367
...@@ -2483,12 +2483,11 @@ static int32_t buildComposedDataBlock(STsdbReader* pReader) { ...@@ -2483,12 +2483,11 @@ static int32_t buildComposedDataBlock(STsdbReader* pReader) {
SBlockIndex bIndex = {0}; SBlockIndex bIndex = {0};
bool hasNeighbor = getNeighborBlockOfSameTable(pBlockInfo, pBlockScanInfo, &nextIndex, pReader->order, &bIndex); bool hasNeighbor = getNeighborBlockOfSameTable(pBlockInfo, pBlockScanInfo, &nextIndex, pReader->order, &bIndex);
if (!hasNeighbor) { // do nothing if (!hasNeighbor) { // do nothing
return 0; setBlockAllDumped(pDumpInfo, pBlock->maxKey.ts, pReader->order);
break;
} }
bool overlap = overlapWithNeighborBlock(pBlock, &bIndex, pReader->order); if (overlapWithNeighborBlock(pBlock, &bIndex, pReader->order)) { // load next block
if (overlap) { // load next block
SReaderStatus* pStatus = &pReader->status; SReaderStatus* pStatus = &pReader->status;
SDataBlockIter* pBlockIter = &pStatus->blockIter; SDataBlockIter* pBlockIter = &pStatus->blockIter;
...@@ -2502,18 +2501,19 @@ static int32_t buildComposedDataBlock(STsdbReader* pReader) { ...@@ -2502,18 +2501,19 @@ static int32_t buildComposedDataBlock(STsdbReader* pReader) {
// 3. load the neighbor block, and set it to be the currently accessed file data block // 3. load the neighbor block, and set it to be the currently accessed file data block
code = doLoadFileBlockData(pReader, pBlockIter, &pStatus->fileBlockData, pBlockInfo->uid); code = doLoadFileBlockData(pReader, pBlockIter, &pStatus->fileBlockData, pBlockInfo->uid);
if (code != TSDB_CODE_SUCCESS) { if (code != TSDB_CODE_SUCCESS) {
return code; setBlockAllDumped(pDumpInfo, pBlock->maxKey.ts, pReader->order);
break;
} }
// 4. check the data values // 4. check the data values
initBlockDumpInfo(pReader, pBlockIter); initBlockDumpInfo(pReader, pBlockIter);
} } else {
setBlockAllDumped(pDumpInfo, pBlock->maxKey.ts, pReader->order); setBlockAllDumped(pDumpInfo, pBlock->maxKey.ts, pReader->order);
break; break;
} }
} }
} }
}
bool hasBlockLData = hasDataInLastBlock(pLastBlockReader); bool hasBlockLData = hasDataInLastBlock(pLastBlockReader);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册