fix(tsdb):check the result of the binary search for the end position in data file block.

This commit is contained in:
Haojun Liao 2024-06-27 14:27:15 +08:00
parent a44e17d5ea
commit dc78cf32cb
1 changed files with 4 additions and 0 deletions

View File

@ -927,6 +927,10 @@ static int32_t getEndPosInDataBlock(STsdbReader* pReader, SBlockData* pBlockData
} else {
int64_t key = asc ? pReader->info.window.ekey : pReader->info.window.skey;
endPos = doBinarySearchKey(pBlockData->aTSKEY, pRecord->numRow, pos, key, pReader->info.order);
if (endPos == -1) {
return endPos;
}
endPos = findFirstPos(pBlockData->aTSKEY, pRecord->numRow, endPos, asc);
}