diff options
author | alexvru <alexvru@ydb.tech> | 2023-01-25 19:31:40 +0300 |
---|---|---|
committer | alexvru <alexvru@ydb.tech> | 2023-01-25 19:31:40 +0300 |
commit | d796d4eb742557a71d57046ca7fbaedec3ce60a9 (patch) | |
tree | fd3b46945fe1d778811ce424e223d0f280c119f8 | |
parent | f4b241dfda76e1d4664b9436cdd7a6db395aefec (diff) | |
download | ydb-d796d4eb742557a71d57046ca7fbaedec3ce60a9.tar.gz |
Fix VDiskAssimilation test
-rw-r--r-- | ydb/core/blobstorage/ut_blobstorage/assimilation.cpp | 1 | ||||
-rw-r--r-- | ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeleton.cpp | 2 | ||||
-rw-r--r-- | ydb/core/protos/blobstorage.proto | 2 |
3 files changed, 4 insertions, 1 deletions
diff --git a/ydb/core/blobstorage/ut_blobstorage/assimilation.cpp b/ydb/core/blobstorage/ut_blobstorage/assimilation.cpp index 29a83a61c6f..c2514d3d665 100644 --- a/ydb/core/blobstorage/ut_blobstorage/assimilation.cpp +++ b/ydb/core/blobstorage/ut_blobstorage/assimilation.cpp @@ -94,6 +94,7 @@ Y_UNIT_TEST_SUITE(VDiskAssimilation) { const TActorId client = runtime->AllocateEdgeActor(vdiskId.NodeId(), __FILE__, __LINE__); auto ev = std::make_unique<TEvBlobStorage::TEvVAssimilate>(info->GetVDiskId(i), lastBlock, lastBarrier, lastBlob); + ev->Record.SetIgnoreDecommitState(true); runtime->Send(new IEventHandle(vdiskId, client, ev.release()), vdiskId.NodeId()); auto res = env.WaitForEdgeActorEvent<TEvBlobStorage::TEvVAssimilateResult>(client); const auto& record = res->Get()->Record; diff --git a/ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeleton.cpp b/ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeleton.cpp index 74bfc0da383..94be2f52815 100644 --- a/ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeleton.cpp +++ b/ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeleton.cpp @@ -1296,7 +1296,7 @@ namespace NKikimr { void Handle(TEvBlobStorage::TEvVAssimilate::TPtr& ev, const TActorContext& ctx) { if (!SelfVDiskId.SameDisk(ev->Get()->Record.GetVDiskID())) { ReplyError(NKikimrProto::RACE, "group generation mismatch", ev, ctx, TAppData::TimeProvider->Now()); - } else if (!BlockWrites(GInfo->DecommitStatus)) { + } else if (!BlockWrites(GInfo->DecommitStatus) && !ev->Get()->Record.GetIgnoreDecommitState()) { ReplyError(NKikimrProto::ERROR, "decommission didn't start yet", ev, ctx, TAppData::TimeProvider->Now()); } else { const TActorId actorId = RunInBatchPool(ctx, CreateAssimilationActor(Hull->GetIndexSnapshot(), ev, SelfVDiskId)); diff --git a/ydb/core/protos/blobstorage.proto b/ydb/core/protos/blobstorage.proto index 1b05fdf7725..1ab7de1894e 100644 --- a/ydb/core/protos/blobstorage.proto +++ b/ydb/core/protos/blobstorage.proto @@ -596,6 +596,8 @@ message TEvVAssimilate { optional fixed64 SkipBlocksUpTo = 10; // return keys strictly greater than this; if not set, return since the first one optional TBarrierKey SkipBarriersUpTo = 11; // the same behaviour optional NKikimrProto.TLogoBlobID SkipBlobsUpTo = 12; // the same behaviour + + optional bool IgnoreDecommitState = 13 [default = false]; // do not check if VDisk belongs to a being-decommitted group } message TEvVAssimilateResult { |