diff options
author | serg-belyakov <serg-belyakov@yandex-team.com> | 2023-03-17 16:45:32 +0300 |
---|---|---|
committer | serg-belyakov <serg-belyakov@yandex-team.com> | 2023-03-17 16:45:32 +0300 |
commit | 0e6e524d966001c8bf2cfc8b1d63af89df3ea2af (patch) | |
tree | f4ea4b511b4f6b117592815e07a1749aaa41a2e5 | |
parent | 1cd192d6a6ded9f2092bc168241eaf37f5159e72 (diff) | |
download | ydb-0e6e524d966001c8bf2cfc8b1d63af89df3ea2af.tar.gz |
Fit group on sanitizing request,
Fir group on sanitizing request,
-rw-r--r-- | ydb/core/blobstorage/ut_blobstorage/sanitize_groups.cpp | 7 | ||||
-rw-r--r-- | ydb/core/mind/bscontroller/cmds_storage_pool.cpp | 6 | ||||
-rw-r--r-- | ydb/core/mind/bscontroller/error.h | 11 | ||||
-rw-r--r-- | ydb/core/protos/blobstorage_config.proto | 1 |
4 files changed, 18 insertions, 7 deletions
diff --git a/ydb/core/blobstorage/ut_blobstorage/sanitize_groups.cpp b/ydb/core/blobstorage/ut_blobstorage/sanitize_groups.cpp index 8d3d055319..4ad388e5ff 100644 --- a/ydb/core/blobstorage/ut_blobstorage/sanitize_groups.cpp +++ b/ydb/core/blobstorage/ut_blobstorage/sanitize_groups.cpp @@ -4,13 +4,6 @@ Y_UNIT_TEST_SUITE(GroupLayoutSanitizer) { Y_UNIT_TEST(Test3dc) { - // There is a bug in group layout sanitzier, which makes it consume CPU infinitely - // Since group layout sanitizer now is being tested and disabled on clusters - // this test is not representative and not needed yet - // TODO serg-belyakov@: fix the bug - - return; - const ui32 numRacks = 15; TBlobStorageGroupType groupType = TBlobStorageGroupType::ErasureMirror3dc; std::vector<ui32> nodesPerRack(numRacks); diff --git a/ydb/core/mind/bscontroller/cmds_storage_pool.cpp b/ydb/core/mind/bscontroller/cmds_storage_pool.cpp index acc1805d1c..22f098c8b9 100644 --- a/ydb/core/mind/bscontroller/cmds_storage_pool.cpp +++ b/ydb/core/mind/bscontroller/cmds_storage_pool.cpp @@ -635,6 +635,12 @@ namespace NKikimr::NBsController { void TBlobStorageController::TConfigState::ExecuteStep(const NKikimrBlobStorage::TSanitizeGroup& cmd, NKikimrBlobStorage::TConfigResponse::TStatus& /*status*/) { ui32 groupId = cmd.GetGroupId(); SanitizingRequests.emplace(groupId); + const TGroupInfo *group = Groups.Find(groupId); + if (group) { + Fit.PoolsAndGroups.emplace(group->StoragePoolId, groupId); + } else { + throw TExGroupNotFound(groupId); + } } } // NKikimr::NBsController diff --git a/ydb/core/mind/bscontroller/error.h b/ydb/core/mind/bscontroller/error.h index 6effcb3fef..6d8401826d 100644 --- a/ydb/core/mind/bscontroller/error.h +++ b/ydb/core/mind/bscontroller/error.h @@ -148,6 +148,17 @@ namespace NKikimr::NBsController { } }; + struct TExGroupNotFound : TExError { + TExGroupNotFound(ui32 groupId) { + *this << "Group not found" + << TErrorParams::GroupId(groupId); + } + + NKikimrBlobStorage::TConfigResponse::TStatus::EFailReason GetFailReason() const override { + return NKikimrBlobStorage::TConfigResponse::TStatus::kGroupNotFound; + } + }; + struct TExMayLoseData : TExError { TExMayLoseData(ui32 groupId) { *this << "Group may lose data" diff --git a/ydb/core/protos/blobstorage_config.proto b/ydb/core/protos/blobstorage_config.proto index 6076152961..9793cf80a2 100644 --- a/ydb/core/protos/blobstorage_config.proto +++ b/ydb/core/protos/blobstorage_config.proto @@ -698,6 +698,7 @@ message TConfigResponse { kDiskIsNotDonor = 8; kAlready = 9; kMayGetDegraded = 10; + kGroupNotFound = 11; } message TFailParam { |