Skip to content

Commit a4353f8

Browse files
fix tests
1 parent 593f5d5 commit a4353f8

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

ydb/core/tx/columnshard/engines/portions/constructor.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,16 @@ class TPortionInfoConstructor {
236236
return linkRange.RestoreRange(GetBlobId(linkRange.GetBlobIdxVerified()));
237237
}
238238

239+
const TBlobRange RestoreBlobRangeSlow(const TBlobRangeLink16& linkRange, const TChunkAddress& address) const {
240+
for (auto&& i : BlobIdxs) {
241+
if (i.GetAddress() == address) {
242+
return linkRange.RestoreRange(GetBlobId(i.GetBlobIdx()));
243+
}
244+
}
245+
AFL_VERIFY(false);
246+
return TBlobRange();
247+
}
248+
239249
const TUnifiedBlobId& GetBlobId(const TBlobRangeLink16::TLinkId linkId) const {
240250
AFL_VERIFY(linkId < BlobIds.size());
241251
return BlobIds[linkId];

ydb/core/tx/columnshard/engines/ut/ut_logs_engine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ void AddIdsToBlobs(std::vector<TWritePortionInfoWithBlobsResult>& portions, NBlo
284284
blobsData.emplace(blobId, b.GetResultBlob());
285285
}
286286
for (auto&& rec : portion.GetPortionConstructor().GetRecords()) {
287-
auto range = portion.GetPortionConstructor().RestoreBlobRange(rec.BlobRange);
287+
auto range = portion.GetPortionConstructor().RestoreBlobRangeSlow(rec.BlobRange, rec.GetAddress());
288288
auto it = blobsData.find(range.BlobId);
289289
AFL_VERIFY(it != blobsData.end());
290290
const TString& data = it->second;

0 commit comments

Comments
 (0)