Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy table with sequence #2284

Closed
wants to merge 37 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
41c781c
Only fomichev3000 can approve changes in this branch
alexv-smirnov Feb 1, 2024
2eba93f
Update CODEOWNERS
alexv-smirnov Feb 1, 2024
6149d92
Only members of ReleaseApprovers team can approve changes in this branch
alexv-smirnov Feb 1, 2024
8773c1c
merge performance improvement changes to stable-24-1 (#1576)
gridnevvvit Feb 5, 2024
4f74dd7
Add compatibility info (#1583)
serbel324 Feb 5, 2024
a2eb383
fix empty config requirement (#1622)
Enjection Feb 6, 2024
afd43bd
Set mkql runtime version. (#1609)
spuchin Feb 7, 2024
0d8c09c
Fix scheme_tests canondata (#1493) (#1643)
gridnevvvit Feb 7, 2024
9b503c2
remove debugging cerr (24-1) (#1642)
gridnevvvit Feb 7, 2024
2751a13
Merge some fixes from main (#1672)
alexvru Feb 7, 2024
9608841
Fix autoconfig's compute cpu table (#1701)
kruall Feb 8, 2024
ae6ef0c
YQL-17542 finalize split sync async CAs (#1689)
zverevgeny Feb 9, 2024
679ef9f
KIKIMR-21016: Проставить версию SSA Runtime в 24-1 (#1785)
iddqdex Feb 12, 2024
9e90229
Do not call TypeName if trace is not used. (#1506)
dcherednik Feb 12, 2024
2e2efae
improve base stats propagation logic (#1741) (#1857)
alexd65536 Feb 13, 2024
3db86df
Fix the processing of incorrect SourceId (#1555) (#1581)
nshestakov Feb 13, 2024
e95a49c
Make coordination session ping period dependent on session timeout KI…
snaury Feb 13, 2024
781d28d
Make stopping result/notification sending dependent on operation type…
snaury Feb 13, 2024
494165b
Disable volatile transactions KIKIMR-21060 (#1888)
snaury Feb 13, 2024
8e8a246
Disable KQP feature flags for stable branch. (#1885)
spuchin Feb 14, 2024
e479c3c
Remove MvccTestOutOfOrderRestartLocksSingleWithoutBarrier (#1905) (#1…
snaury Feb 14, 2024
81296f9
Mute CostMetrics tests in 24-1 (#1948)
serbel324 Feb 14, 2024
c076edf
Merge to 24.1 (#1772)
ssmike Feb 15, 2024
0c2f282
Fix readset acks sent too early in volatile transactions (#1961)
snaury Feb 16, 2024
1677666
Use uid as idempotency key KIKIMR-21059 (#2059)
CyberROFL Feb 19, 2024
cfdbc77
Enable DDL in ExecuteScript. Allow not to specify TxControl in QueryS…
UgnineSirdis Feb 19, 2024
782ac23
Fix lost coordinator steps during mediator reconnect race (#2037) (#2…
snaury Feb 19, 2024
c1a933b
Cannonized two plans (#1773) (#2081)
pavelvelikhov Feb 19, 2024
321f683
fix iam monitoring (#2061) (#2113)
adameat Feb 21, 2024
09dbd42
correctly fix memlimit exception problem (#2135)
gridnevvvit Feb 21, 2024
5e91e28
Disable distconf in 24-1 (#2147)
alexvru Feb 21, 2024
0872878
KIKIMR-20082: TableStore/ColumnTable with QueryService (#1377) (#1647)
shnikd Feb 21, 2024
08d5b07
Support temp tables in yql (#2141)
shnikd Feb 21, 2024
7d89162
Stable-24-1 cs patch 2 (#2145)
ivanmorozov333 Feb 22, 2024
fd4ca58
Merge default values for columns fixes and changes to stable 24 1 (#2…
gridnevvvit Feb 22, 2024
4d69554
Initial commit
shnikd Feb 22, 2024
38283dc
Fixes
shnikd Feb 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,13 +1 @@
/ydb/core/fq/ @ydb-platform/fq
/ydb/core/public_http/ @ydb-platform/fq

/ydb/docs/ @ydb-platform/docs

/ydb/library/yql/ @ydb-platform/yql
/ydb/library/yql/providers/generic @ydb-platform/fq
/ydb/library/yql/providers/pq @ydb-platform/fq
/ydb/library/yql/providers/s3 @ydb-platform/fq
/ydb/library/yql/providers/solomon @ydb-platform/fq

/ydb/services/fq/ @ydb-platform/fq

* @ydb-platform/ReleaseApprovers
2 changes: 1 addition & 1 deletion .github/config/muted_ya.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ydb/core/blobstorage/dsproxy/ut TBlobStorageProxySequenceTest.TestBlock42PutWith
ydb/core/blobstorage/dsproxy/ut_fat TBlobStorageProxyTest.TestBatchedPutRequestDoesNotContainAHugeBlob
ydb/core/blobstorage/pdisk/ut TSectorMap.*
ydb/core/blobstorage/ut_blobstorage/ut_read_only_vdisk ReadOnlyVDisk.TestStorageLoad
ydb/core/blobstorage/ut_blobstorage CostMetricsGetBlock4Plus2.TestGet4Plus2BlockRequests10000Inflight1BlobSize1000
ydb/core/blobstorage/ut_blobstorage CostMetrics*
ydb/core/blobstorage/ut_blobstorage Defragmentation.DoesItWork
ydb/core/blobstorage/ut_blobstorage SpaceCheckForDiskReassign.*
ydb/core/blobstorage/ut_blobstorage ScrubFast.SingleBlob
Expand Down
4 changes: 4 additions & 0 deletions ydb/core/blobstorage/backpressure/queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ class TBlobStorageQueue {
return Queues.InFlight.size();
}

ui64 GetInFlightCost() const {
return InFlightCost;
}

void UpdateCostModel(TInstant now, const NKikimrBlobStorage::TVDiskCostSettings& settings,
const TBlobStorageGroupType& type);
void InvalidateCosts();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,11 @@ class TVDiskBackpressureClientActor : public TActorBootstrapped<TVDiskBackpressu
<< " msgId# " << msgId << " sequenceId# " << sequenceId
<< " expectedMsgId# " << expectedMsgId << " expectedSequenceId# " << expectedSequenceId
<< " status# " << NKikimrProto::EReplyStatus_Name(status)
<< " ws# " << NKikimrBlobStorage::TWindowFeedback_EStatus_Name(ws));
<< " ws# " << NKikimrBlobStorage::TWindowFeedback_EStatus_Name(ws)
<< " InFlightCost# " << Queue.GetInFlightCost()
<< " InFlightCount# " << Queue.InFlightCount()
<< " ItemsWaiting# " << Queue.GetItemsWaiting()
<< " BytesWaiting# " << Queue.GetBytesWaiting());

switch (ws) {
case NKikimrBlobStorage::TWindowFeedback::IncorrectMsgId:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,7 @@ namespace NKikimr {
}
}

TWindowStatus *Processed(bool checkMsgId, const TMessageId &msgId, ui64 cost, TWindowStatus *opStatus) {
Y_UNUSED(checkMsgId);
Y_UNUSED(msgId);
TWindowStatus *Processed(bool /*checkMsgId*/, const TMessageId& /*msgId*/, ui64 cost, TWindowStatus *opStatus) {
Y_ABORT_UNLESS(Cost >= cost);
Cost -= cost;
--InFlight;
Expand Down
5 changes: 3 additions & 2 deletions ydb/core/blobstorage/dsproxy/dsproxy_get_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,12 +293,13 @@ void TGetImpl::PrepareRequests(TLogContext &logCtx, TDeque<std::unique_ptr<TEvBl
msg->SetId(ReaderTabletData->Id);
msg->SetGeneration(ReaderTabletData->Generation);
}
R_LOG_DEBUG_SX(logCtx, "BPG14", "Send get to orderNumber# " << get.OrderNumber
<< " vget# " << vget->ToString());
}

for (auto& vget : gets) {
if (vget) {
R_LOG_DEBUG_SX(logCtx, "BPG14", "Send get to orderNumber# "
<< Info->GetTopology().GetOrderNumber(VDiskIDFromVDiskID(vget->Record.GetVDiskID()))
<< " vget# " << vget->ToString());
outVGets.push_back(std::move(vget));
++RequestIndex;
}
Expand Down
26 changes: 17 additions & 9 deletions ydb/core/blobstorage/dsproxy/dsproxy_patch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class TBlobStorageGroupPatchRequest : public TBlobStorageGroupRequestActor<TBlob
TStackVec<bool, TypicalDisksInSubring> ReceivedResponseFlags;
TStackVec<bool, TypicalDisksInSubring> EmptyResponseFlags;
TStackVec<bool, TypicalDisksInSubring> ErrorResponseFlags;
TStackVec<bool, TypicalDisksInSubring> ForceStopFlags;
TBlobStorageGroupInfo::TVDiskIds VDisks;

bool UseVPatch = false;
Expand Down Expand Up @@ -332,8 +333,15 @@ class TBlobStorageGroupPatchRequest : public TBlobStorageGroupRequestActor<TBlob
}

void Handle(TEvBlobStorage::TEvVPatchResult::TPtr &ev) {
ReceivedResults++;
NKikimrBlobStorage::TEvVPatchResult &record = ev->Get()->Record;

Y_ABORT_UNLESS(record.HasCookie());
ui8 subgroupIdx = record.GetCookie();
if (ForceStopFlags[subgroupIdx]) {
return; // ignore force stop response
}
ReceivedResults++;

PullOutStatusFlagsAndFressSpace(record);
Y_ABORT_UNLESS(record.HasStatus());
NKikimrProto::EReplyStatus status = record.GetStatus();
Expand All @@ -342,9 +350,6 @@ class TBlobStorageGroupPatchRequest : public TBlobStorageGroupRequestActor<TBlob
errorReason = record.GetErrorReason();
}

Y_ABORT_UNLESS(record.HasCookie());
ui8 subgroupIdx = record.GetCookie();

PATCH_LOG(PRI_DEBUG, BS_PROXY_PATCH, BPPA23, "Received VPatchResult",
(Status, status),
(SubgroupIdx, (ui32)subgroupIdx),
Expand Down Expand Up @@ -413,15 +418,16 @@ class TBlobStorageGroupPatchRequest : public TBlobStorageGroupRequestActor<TBlob
void SendStopDiffs() {
PATCH_LOG(PRI_DEBUG, BS_PROXY_PATCH, BPPA18, "Send stop diffs");
TDeque<std::unique_ptr<TEvBlobStorage::TEvVPatchDiff>> events;
for (ui32 vdiskIdx = 0; vdiskIdx < VDisks.size(); ++vdiskIdx) {
if (!ErrorResponseFlags[vdiskIdx] && !EmptyResponseFlags[vdiskIdx] && ReceivedResponseFlags[vdiskIdx]) {
for (ui32 subgroupIdx = 0; subgroupIdx < VDisks.size(); ++subgroupIdx) {
if (!ErrorResponseFlags[subgroupIdx] && !EmptyResponseFlags[subgroupIdx] && ReceivedResponseFlags[subgroupIdx]) {
std::unique_ptr<TEvBlobStorage::TEvVPatchDiff> ev = std::make_unique<TEvBlobStorage::TEvVPatchDiff>(
OriginalId, PatchedId, VDisks[vdiskIdx], 0, Deadline, vdiskIdx);
OriginalId, PatchedId, VDisks[subgroupIdx], 0, Deadline, subgroupIdx);
ev->SetForceEnd();
ForceStopFlags[subgroupIdx] = true;
events.emplace_back(std::move(ev));
PATCH_LOG(PRI_DEBUG, BS_PROXY_PATCH, BPPA19, "Send stop message",
(VDiskIdxInSubgroup, vdiskIdx),
(VDiskId, VDisks[vdiskIdx]));
(VDiskIdxInSubgroup, subgroupIdx),
(VDiskId, VDisks[subgroupIdx]));
}
}
SendToQueues(events, false);
Expand Down Expand Up @@ -495,6 +501,7 @@ class TBlobStorageGroupPatchRequest : public TBlobStorageGroupRequestActor<TBlob
PATCH_LOG(PRI_DEBUG, BS_PROXY_PATCH, BPPA20, "Send TEvVPatchDiff",
(VDiskIdxInSubgroup, idxInSubgroup),
(PatchedVDiskIdxInSubgroup, patchedIdxInSubgroup),
(PartId, (ui64)partPlacement.PartId),
(DiffsForPart, diffsForPart.size()),
(ParityPlacements, parityPlacements.size()),
(WaitedXorDiffs, waitedXorDiffs));
Expand Down Expand Up @@ -586,6 +593,7 @@ class TBlobStorageGroupPatchRequest : public TBlobStorageGroupRequestActor<TBlob
ReceivedResponseFlags.assign(VDisks.size(), false);
ErrorResponseFlags.assign(VDisks.size(), false);
EmptyResponseFlags.assign(VDisks.size(), false);
ForceStopFlags.assign(VDisks.size(), false);

TDeque<std::unique_ptr<TEvBlobStorage::TEvVPatchStart>> events;

Expand Down
2 changes: 1 addition & 1 deletion ydb/core/blobstorage/nodewarden/node_warden_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ void TNodeWarden::Bootstrap() {

StartInvalidGroupProxy();

StartDistributedConfigKeeper();
// StartDistributedConfigKeeper(); // disabled in 24-1
}

void TNodeWarden::HandleReadCache() {
Expand Down
9 changes: 9 additions & 0 deletions ydb/core/blobstorage/pdisk/mock/pdisk_mock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,11 @@ struct TPDiskMockState::TImpl {
}
}

bool HasCorruptedArea(ui32 chunkIdx, ui32 begin, ui32 end) {
const ui64 chunkBegin = ui64(chunkIdx) * ChunkSize;
return static_cast<bool>(Corrupted & TIntervalSet{chunkBegin + begin, chunkBegin + end});
}

std::set<ui32> GetChunks() {
std::set<ui32> res;
for (auto& [ownerId, owner] : Owners) {
Expand Down Expand Up @@ -290,6 +295,10 @@ void TPDiskMockState::SetCorruptedArea(ui32 chunkIdx, ui32 begin, ui32 end, bool
Impl->SetCorruptedArea(chunkIdx, begin, end, enabled);
}

bool TPDiskMockState::HasCorruptedArea(ui32 chunkIdx, ui32 begin, ui32 end) {
return Impl->HasCorruptedArea(chunkIdx, begin, end);
}

std::set<ui32> TPDiskMockState::GetChunks() {
return Impl->GetChunks();
}
Expand Down
1 change: 1 addition & 0 deletions ydb/core/blobstorage/pdisk/mock/pdisk_mock.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ namespace NKikimr {
~TPDiskMockState();

void SetCorruptedArea(ui32 chunkIdx, ui32 begin, ui32 end, bool enabled);
bool HasCorruptedArea(ui32 chunkIdx, ui32 begin, ui32 end);
std::set<ui32> GetChunks();
TMaybe<NPDisk::TOwnerRound> GetOwnerRound(const TVDiskID& vDiskId) const;
ui32 GetChunkSize() const;
Expand Down
152 changes: 109 additions & 43 deletions ydb/core/blobstorage/ut_blobstorage/scrub_fast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,64 +16,130 @@ void Test() {

TString data = TString::Uninitialized(8_MB);
memset(data.Detach(), 'X', data.size());
TLogoBlobID id(1, 1, 1, 0, data.size(), 0);

{ // write data to group
TActorId sender = runtime->AllocateEdgeActor(1);
runtime->WrapInActorContext(sender, [&] {
SendToBSProxy(sender, info->GroupID, new TEvBlobStorage::TEvPut(id, data, TInstant::Max()));
});
auto res = env.WaitForEdgeActorEvent<TEvBlobStorage::TEvPutResult>(sender);
UNIT_ASSERT_VALUES_EQUAL(res->Get()->Status, NKikimrProto::OK);
}

auto checkReadable = [&](NKikimrProto::EReplyStatus status) {
TActorId sender = runtime->AllocateEdgeActor(1);
runtime->WrapInActorContext(sender, [&] {
SendToBSProxy(sender, info->GroupID, new TEvBlobStorage::TEvGet(id, 0, 0, TInstant::Max(),
NKikimrBlobStorage::EGetHandleClass::FastRead));
});
auto res = env.WaitForEdgeActorEvent<TEvBlobStorage::TEvGetResult>(sender);
UNIT_ASSERT_VALUES_EQUAL(res->Get()->Status, NKikimrProto::OK);
UNIT_ASSERT_VALUES_EQUAL(res->Get()->ResponseSz, 1);
auto& r = res->Get()->Responses[0];
UNIT_ASSERT_VALUES_EQUAL(r.Status, status);
if (status == NKikimrProto::OK) {
UNIT_ASSERT_VALUES_EQUAL(r.Buffer.ConvertToString(), data);
for (ui32 step = 1; step < 100; ++step) {
TLogoBlobID id(1, 1, step, 0, data.size(), 0);

{ // write data to group
TActorId sender = runtime->AllocateEdgeActor(1);
runtime->WrapInActorContext(sender, [&] {
SendToBSProxy(sender, info->GroupID, new TEvBlobStorage::TEvPut(id, data, TInstant::Max()));
});
auto res = env.WaitForEdgeActorEvent<TEvBlobStorage::TEvPutResult>(sender);
UNIT_ASSERT_VALUES_EQUAL(res->Get()->Status, NKikimrProto::OK);
}
};

checkReadable(NKikimrProto::OK);
auto checkReadable = [&] {
TActorId sender = runtime->AllocateEdgeActor(1);
runtime->WrapInActorContext(sender, [&] {
SendToBSProxy(sender, info->GroupID, new TEvBlobStorage::TEvGet(id, 0, 0, TInstant::Max(),
NKikimrBlobStorage::EGetHandleClass::FastRead));
});
auto res = env.WaitForEdgeActorEvent<TEvBlobStorage::TEvGetResult>(sender);
UNIT_ASSERT_VALUES_EQUAL(res->Get()->Status, NKikimrProto::OK);
UNIT_ASSERT_VALUES_EQUAL(res->Get()->ResponseSz, 1);
auto& r = res->Get()->Responses[0];
UNIT_ASSERT_VALUES_EQUAL(r.Status, NKikimrProto::OK);
UNIT_ASSERT_VALUES_EQUAL(r.Buffer.ConvertToString(), data);

ui32 partsMask = 0;
for (ui32 i = 0; i < info->GetTotalVDisksNum(); ++i) {
const TVDiskID& vdiskId = info->GetVDiskId(i);
env.WithQueueId(vdiskId, NKikimrBlobStorage::EVDiskQueueId::GetFastRead, [&](TActorId queueId) {
const TActorId sender = runtime->AllocateEdgeActor(1);
auto ev = TEvBlobStorage::TEvVGet::CreateExtremeDataQuery(vdiskId, TInstant::Max(),
NKikimrBlobStorage::EGetHandleClass::FastRead);
ev->AddExtremeQuery(id, 0, 0);
runtime->Send(new IEventHandle(queueId, sender, ev.release()), sender.NodeId());
auto reply = env.WaitForEdgeActorEvent<TEvBlobStorage::TEvVGetResult>(sender);
auto& record = reply->Get()->Record;
UNIT_ASSERT_VALUES_EQUAL(record.GetStatus(), NKikimrProto::OK);
UNIT_ASSERT_VALUES_EQUAL(record.ResultSize(), 1);
for (const auto& result : record.GetResult()) {
if (result.GetStatus() == NKikimrProto::OK) {
const TLogoBlobID& id = LogoBlobIDFromLogoBlobID(result.GetBlobID());
UNIT_ASSERT(id.PartId());
const ui32 partIdx = id.PartId() - 1;
const ui32 mask = 1 << partIdx;
UNIT_ASSERT(!(partsMask & mask));
partsMask |= mask;
} else {
UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), NKikimrProto::NODATA);
}
}
});
}
UNIT_ASSERT_VALUES_EQUAL(partsMask, (1 << info->Type.TotalPartCount()) - 1);
};

for (ui32 i = 0; i < info->GetTotalVDisksNum(); ++i) {
const TActorId vdiskActorId = info->GetActorId(i);
checkReadable();

ui32 nodeId, pdiskId;
std::tie(nodeId, pdiskId, std::ignore) = DecomposeVDiskServiceId(vdiskActorId);
auto it = env.PDiskMockStates.find(std::make_pair(nodeId, pdiskId));
Y_ABORT_UNLESS(it != env.PDiskMockStates.end());
ui32 mask = 0;

const TActorId sender = runtime->AllocateEdgeActor(vdiskActorId.NodeId());
env.Runtime->Send(new IEventHandle(vdiskActorId, sender, new TEvBlobStorage::TEvCaptureVDiskLayout), sender.NodeId());
auto res = env.WaitForEdgeActorEvent<TEvBlobStorage::TEvCaptureVDiskLayoutResult>(sender);
for (ui32 i = 0; i < info->GetTotalVDisksNum(); ++i) {
const TActorId vdiskActorId = info->GetActorId(i);

for (auto& item : res->Get()->Layout) {
using T = TEvBlobStorage::TEvCaptureVDiskLayoutResult;
if (item.Database == T::EDatabase::LogoBlobs && item.RecordType == T::ERecordType::HugeBlob) {
const TDiskPart& part = item.Location;
it->second->SetCorruptedArea(part.ChunkIdx, part.Offset, part.Offset + part.Size, true);
break;
ui32 nodeId, pdiskId;
std::tie(nodeId, pdiskId, std::ignore) = DecomposeVDiskServiceId(vdiskActorId);
auto it = env.PDiskMockStates.find(std::make_pair(nodeId, pdiskId));
Y_ABORT_UNLESS(it != env.PDiskMockStates.end());

const TActorId sender = runtime->AllocateEdgeActor(vdiskActorId.NodeId());
env.Runtime->Send(new IEventHandle(vdiskActorId, sender, new TEvBlobStorage::TEvCaptureVDiskLayout), sender.NodeId());
auto res = env.WaitForEdgeActorEvent<TEvBlobStorage::TEvCaptureVDiskLayoutResult>(sender);

for (auto& item : res->Get()->Layout) {
using T = TEvBlobStorage::TEvCaptureVDiskLayoutResult;
if (item.Database == T::EDatabase::LogoBlobs && item.RecordType == T::ERecordType::HugeBlob && item.BlobId.FullID() == id) {
const TDiskPart& part = item.Location;
mask |= 1 << i;
it->second->SetCorruptedArea(part.ChunkIdx, part.Offset, part.Offset + 1 + RandomNumber(part.Size), true);
break;
}
}

checkReadable();
}

checkReadable(NKikimrProto::OK);
}
env.Sim(TDuration::Seconds(60));

env.Sim(TDuration::Seconds(60));
for (ui32 i = 0; i < info->GetTotalVDisksNum(); ++i) {
if (~mask >> i & 1) {
continue;
}

const TActorId vdiskActorId = info->GetActorId(i);

ui32 nodeId, pdiskId;
std::tie(nodeId, pdiskId, std::ignore) = DecomposeVDiskServiceId(vdiskActorId);
auto it = env.PDiskMockStates.find(std::make_pair(nodeId, pdiskId));
Y_ABORT_UNLESS(it != env.PDiskMockStates.end());

const TActorId sender = runtime->AllocateEdgeActor(vdiskActorId.NodeId());
env.Runtime->Send(new IEventHandle(vdiskActorId, sender, new TEvBlobStorage::TEvCaptureVDiskLayout), sender.NodeId());
auto res = env.WaitForEdgeActorEvent<TEvBlobStorage::TEvCaptureVDiskLayoutResult>(sender);

bool anyPartReadable = false;

for (auto& item : res->Get()->Layout) {
using T = TEvBlobStorage::TEvCaptureVDiskLayoutResult;
if (item.Database == T::EDatabase::LogoBlobs && item.RecordType == T::ERecordType::HugeBlob && item.BlobId.FullID() == id) {
const TDiskPart& part = item.Location;
anyPartReadable = !it->second->HasCorruptedArea(part.ChunkIdx, part.Offset, part.Offset + part.Size);
if (anyPartReadable) {
break;
}
}
}

UNIT_ASSERT(anyPartReadable);
}
}
}

Y_UNIT_TEST_SUITE(ScrubFast) {
Y_UNIT_TEST(SingleBlob) {
Test();
}
}

Loading
Loading