Merge pull request #9059 from sfc-gh-xwang/fix/main/blobMergeStream

Fix BlobGranuleCorrectness.toml undefined behavior in mergeDeltaStreams
This commit is contained in:
Xiaoxi Wang 2022-12-17 15:15:09 -08:00 committed by GitHub
commit 73f196a137
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -1338,6 +1338,10 @@ static RangeResult mergeDeltaStreams(const BlobGranuleChunkRef& chunk,
ASSERT(streams.size() < std::numeric_limits<int16_t>::max());
ASSERT(startClears.size() == streams.size());
if (streams.empty()) {
return RangeResult{};
}
int prefixLen = commonPrefixLength(chunk.keyRange.begin, chunk.keyRange.end);
// next element for each stream