Skip to content

Commit

Permalink
Added IdWrapper for bscontroller, partly for blobstorage, nodewarden,…
Browse files Browse the repository at this point in the history
… dsproxy
  • Loading branch information
Egor Kulin committed May 29, 2024
1 parent 39423b5 commit 9e5dff8
Show file tree
Hide file tree
Showing 54 changed files with 184 additions and 150 deletions.
4 changes: 2 additions & 2 deletions ydb/core/base/blobstorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ bool operator<(const TPDiskCategory x, const TPDiskCategory y) {

std::unique_ptr<TEvBlobStorage::TEvPutResult> TEvBlobStorage::TEvPut::MakeErrorResponse(
NKikimrProto::EReplyStatus status, const TString& errorReason, TGroupId groupId) {
auto res = std::make_unique<TEvPutResult>(status, Id, TStorageStatusFlags(), groupId.GetRawId(), 0.0f);
auto res = std::make_unique<TEvPutResult>(status, Id, TStorageStatusFlags(), groupId, 0.0f);
res->ErrorReason = errorReason;
return res;
}
Expand Down Expand Up @@ -97,7 +97,7 @@ std::unique_ptr<TEvBlobStorage::TEvDiscoverResult> TEvBlobStorage::TEvDiscover::

std::unique_ptr<TEvBlobStorage::TEvRangeResult> TEvBlobStorage::TEvRange::MakeErrorResponse(
NKikimrProto::EReplyStatus status, const TString& errorReason, TGroupId groupId) {
auto res = std::make_unique<TEvRangeResult>(status, From, To, groupId.GetRawId());
auto res = std::make_unique<TEvRangeResult>(status, From, To, groupId);
res->ErrorReason = errorReason;
return res;
}
Expand Down
26 changes: 16 additions & 10 deletions ydb/core/base/id_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <compare>
#include <concepts>
#include <util/generic/string.h>
#include <util/string/builder.h>
using TString = TBasicString<char>;

class TGroupIdTag;
Expand All @@ -16,15 +17,14 @@ template <typename T, typename Tag> class TIdWrapper {
T Raw;

public:

using Type = T;

constexpr TIdWrapper() noexcept : Raw(0) {
}
using TTag = Tag;

constexpr TIdWrapper() noexcept : Raw(0) {}

~TIdWrapper() = default;

TIdWrapper(const T &value) : Raw(value){};
explicit TIdWrapper(const T &value) : Raw(value) {}

TIdWrapper(TIdWrapper &&value) = default;

Expand All @@ -34,18 +34,20 @@ template <typename T, typename Tag> class TIdWrapper {

TIdWrapper &operator=(TIdWrapper &&value) = default;

TString ToString() const {
return TStringBuilder() << Raw;
}

void CopyToProto(NProtoBuf::Message *message,
void (NProtoBuf::Message::*pfn)(T value)) {
(message->*pfn)(*this);
}

static constexpr TIdWrapper FromValue(T value) noexcept {
return TIdWrapper(value);
return TIdWrapper(value);
}

static constexpr TIdWrapper Zero() noexcept {
return TIdWrapper();
}
static constexpr TIdWrapper Zero() noexcept { return TIdWrapper(); }

TIdWrapper &operator+=(const T &other) {
Raw += other.Raw;
Expand All @@ -68,10 +70,14 @@ template <typename T, typename Tag> class TIdWrapper {
return old;
}

friend std::ostream& operator<<(std::ostream& out, TIdWrapper& id){
friend std::ostream &operator<<(std::ostream &out, TIdWrapper &id) {
return out << id.Raw;
}

friend IOutputStream& operator<<(IOutputStream& out, const TIdWrapper& id) {
return out << id.Raw;
}

constexpr auto operator<=>(const TIdWrapper &) const = default;

T GetRawId() const { return Raw; }
Expand Down
1 change: 1 addition & 0 deletions ydb/core/blob_depot/agent/agent_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "resolved_value.h"

#include <ydb/core/protos/blob_depot_config.pb.h>
#include <ydb/core/base/id_wrapper.h>

namespace NKikimr::NBlobDepot {

Expand Down
2 changes: 1 addition & 1 deletion ydb/core/blob_depot/agent/proxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace NKikimr::NBlobDepot {
switch (const ui32 type = event->Type()) {
case TEvBlobStorage::EvGet: {
auto& get = static_cast<TEvBlobStorage::TEvGet&>(*event);
response = get.MakeErrorResponse(NKikimrProto::OK, "proxy has vanished", groupId);
response = get.MakeErrorResponse(NKikimrProto::OK, "proxy has vanished", TIdWrapper<ui32, TGroupIdTag>(groupId));
auto& r = static_cast<TEvBlobStorage::TEvGetResult&>(*response);
for (size_t i = 0; i < r.ResponseSz; ++i) {
r.Responses[i].Status = NKikimrProto::NODATA;
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/blob_depot/agent/query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ namespace NKikimr::NBlobDepot {
switch (Event->GetTypeRewrite()) {
#define XX(TYPE) \
case TEvBlobStorage::TYPE: \
response = Event->Get<TEvBlobStorage::T##TYPE>()->MakeErrorResponse(status, errorReason, Agent.VirtualGroupId); \
response = Event->Get<TEvBlobStorage::T##TYPE>()->MakeErrorResponse(status, errorReason, TIdWrapper<ui32, TGroupIdTag>(Agent.VirtualGroupId)); \
static_cast<TEvBlobStorage::T##TYPE##Result&>(*response).ExecutionRelay = std::move(ExecutionRelay); \
break; \
//
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/blob_depot/agent/storage_get.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace NKikimr::NBlobDepot {
}

Response = std::make_unique<TEvBlobStorage::TEvGetResult>(NKikimrProto::OK, Request.QuerySize,
Agent.VirtualGroupId);
TIdWrapper<ui32, TGroupIdTag>(Agent.VirtualGroupId));
AnswersRemain = Request.QuerySize;

if (Request.ReaderTabletData) {
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/blob_depot/agent/storage_put.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ namespace NKikimr::NBlobDepot {
Y_ABORT_UNLESS(!WrittenBeyondBarrier);

TBlobStorageQuery::EndWithSuccess(std::make_unique<TEvBlobStorage::TEvPutResult>(NKikimrProto::OK, Request.Id,
Agent.GetStorageStatusFlags(), Agent.VirtualGroupId, Agent.GetApproximateFreeSpaceShare()));
Agent.GetStorageStatusFlags(), TIdWrapper<ui32, TGroupIdTag>(Agent.VirtualGroupId), Agent.GetApproximateFreeSpaceShare()));
}

ui64 GetTabletId() const override {
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/blob_depot/agent/storage_range.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace NKikimr::NBlobDepot {
(U.MustRestoreFirst, Request.MustRestoreFirst), (U.IndexOnly, Request.IsIndexOnly));

Response = std::make_unique<TEvBlobStorage::TEvRangeResult>(NKikimrProto::OK, Request.From, Request.To,
Agent.VirtualGroupId);
TIdWrapper<ui32, TGroupIdTag>(Agent.VirtualGroupId));

// issue resolve query
TString from = Request.From.AsBinaryString();
Expand Down
4 changes: 2 additions & 2 deletions ydb/core/blobstorage/base/blobstorage_vdiskid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace NKikimr {
////////////////////////////////////////////////////////////////////////////
// TVDiskID
////////////////////////////////////////////////////////////////////////////
const TVDiskID TVDiskID::InvalidId = TVDiskID((ui32)-1, (ui32)-1, (ui8)-1, (ui8)-1, (ui8)-1);
const TVDiskID TVDiskID::InvalidId = TVDiskID(TGroupId(-1), (ui32)-1, (ui8)-1, (ui8)-1, (ui8)-1);

TVDiskID::TVDiskID(TGroupId groupId, ui32 groupGen, TVDiskIdShort vdiskIdShort)
: GroupID(groupId)
Expand All @@ -24,7 +24,7 @@ namespace NKikimr {
}

bool TVDiskID::SameGroupAndGeneration(const NKikimrBlobStorage::TVDiskID &x) const {
return x.GetGroupID() == GroupID && x.GetGroupGeneration() == GroupGeneration;
return x.GetGroupID() == GroupID.GetRawId() && x.GetGroupGeneration() == GroupGeneration;
}

bool TVDiskID::SameDisk(const NKikimrBlobStorage::TVDiskID &x) const {
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/blobstorage/dsproxy/dsproxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ class TBlobStorageGroupRequestActor : public TActor<TDerived> {
std::optional<NKikimrBlobStorage::TGroupInfo> group;
if (record.HasRecentGroup()) {
group = record.GetRecentGroup();
if (group->GetGroupID() != Info->GroupID || group->GetGroupGeneration() != vdiskId.GroupGeneration) {
if (group->GetGroupID() != Info->GroupID.GetRawId() || group->GetGroupGeneration() != vdiskId.GroupGeneration) {
return done(NKikimrProto::ERROR, "incorrect RecentGroup for RACE response");
}
}
Expand Down
4 changes: 2 additions & 2 deletions ydb/core/blobstorage/dsproxy/dsproxy_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class TBlobStorageGroupProxy : public TActorBootstrapped<TBlobStorageGroupProxy>
TLogPriorityMuteChecker<NLog::PRI_INFO, NLog::PRI_DEBUG> ErrorStateMuteChecker;
TLogPriorityMuteChecker<NLog::PRI_CRIT, NLog::PRI_DEBUG> InvalidGroupIdMuteChecker;

bool HasInvalidGroupId() const { return GroupId == Max<ui32>(); }
bool HasInvalidGroupId() const { return GroupId.GetRawId() == Max<ui32>(); }
void ProcessInitQueue();

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -285,7 +285,7 @@ class TBlobStorageGroupProxy : public TActorBootstrapped<TBlobStorageGroupProxy>
const NKikimrProto::EReplyStatus status = (!IsEjected || HasInvalidGroupId())
? NKikimrProto::ERROR
: NKikimrProto::NO_GROUP;
auto response = ev->Get()->MakeErrorResponse(status, ErrorDescription, GroupId.GetRawId());
auto response = ev->Get()->MakeErrorResponse(status, ErrorDescription, GroupId);
SetExecutionRelay(*response, std::move(ev->Get()->ExecutionRelay));
NActors::NLog::EPriority priority = CheckPriorityForErrorState();
LOG_LOG_S(*TlsActivationContext, priority, NKikimrServices::BS_PROXY, ExtraLogInfo << "Group# " << GroupId
Expand Down
6 changes: 3 additions & 3 deletions ydb/core/blobstorage/dsproxy/dsproxy_patch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ class TBlobStorageGroupPatchRequest : public TBlobStorageGroupRequestActor<TBlob
auto get = std::make_unique<TEvBlobStorage::TEvGet>(OriginalId, 0, OriginalId.BlobSize(), Deadline,
NKikimrBlobStorage::AsyncRead);
get->Orbit = std::move(Orbit);
if (OriginalGroupId == Info->GroupID) {
if (OriginalGroupId == Info->GroupID.GetRawId()) {
SendToProxy(std::move(get), PatchedId.Hash(), Span.GetTraceId());
} else {
SendToBSProxy(SelfId(), OriginalGroupId, get.release(), PatchedId.Hash(), Span.GetTraceId());
Expand Down Expand Up @@ -811,15 +811,15 @@ class TBlobStorageGroupPatchRequest : public TBlobStorageGroupRequestActor<TBlob
IsAllowedErasure = Info->Type.ErasureFamily() == TErasureType::ErasureParityBlock
|| Info->Type.GetErasure() == TErasureType::ErasureNone
|| Info->Type.GetErasure() == TErasureType::ErasureMirror3dc;
if (IsGoodPatchedBlobId && IsAllowedErasure && UseVPatch && OriginalGroupId == Info->GroupID && !IsSecured) {
if (IsGoodPatchedBlobId && IsAllowedErasure && UseVPatch && OriginalGroupId == Info->GroupID.GetRawId() && !IsSecured) {
PATCH_LOG(PRI_DEBUG, BS_PROXY_PATCH, BPPA03, "Start VPatch strategy from bootstrap");
StartVPatch();
} else {
PATCH_LOG(PRI_DEBUG, BS_PROXY_PATCH, BPPA04, "Start Fallback strategy from bootstrap",
(IsGoodPatchedBlobId, IsGoodPatchedBlobId),
(IsAllowedErasure, IsAllowedErasure),
(UseVPatch, UseVPatch),
(IsSameGroup, OriginalGroupId == Info->GroupID),
(IsSameGroup, OriginalGroupId == Info->GroupID.GetRawId()),
(IsSecured, IsSecured));
StartFallback();
}
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/blobstorage/dsproxy/dsproxy_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ namespace NKikimr {
<< " Group# " << GroupId
<< " Marker# DSP53";
std::unique_ptr<TEvBlobStorage::TEvPutResult> result(
new TEvBlobStorage::TEvPutResult(NKikimrProto::ERROR, ev->Get()->Id, 0, GroupId.GetRawId(), 0.f));
new TEvBlobStorage::TEvPutResult(NKikimrProto::ERROR, ev->Get()->Id, 0, GroupId, 0.f));
result->ErrorReason = str.Str();
result->ExecutionRelay = std::move(ev->Get()->ExecutionRelay);
LOG_ERROR_S(*TlsActivationContext, NKikimrServices::BS_PROXY,
Expand Down
7 changes: 4 additions & 3 deletions ydb/core/blobstorage/dsproxy/mock/dsproxy_mock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ namespace NKikimr {

class TBlobStorageGroupProxyMockActor
: public TActor<TBlobStorageGroupProxyMockActor>
{
{
using TGroupId = TIdWrapper<ui32, TGroupIdTag>;
TIntrusivePtr<NFake::TProxyDS> Model;

void Handle(TEvBlobStorage::TEvPut::TPtr& ev) {
Expand Down Expand Up @@ -106,7 +107,7 @@ namespace NKikimr {
{}


TBlobStorageGroupProxyMockActor(ui32 groupId)
TBlobStorageGroupProxyMockActor(TGroupId groupId)
: TActor(&TBlobStorageGroupProxyMockActor::StateFunc)
, Model(MakeIntrusive<NFake::TProxyDS>(groupId))
{}
Expand All @@ -117,7 +118,7 @@ namespace NKikimr {
return new TBlobStorageGroupProxyMockActor(std::move(model));
}

IActor *CreateBlobStorageGroupProxyMockActor(ui32 groupId) {
IActor *CreateBlobStorageGroupProxyMockActor(TIdWrapper<ui32, TGroupIdTag> groupId) {
return new TBlobStorageGroupProxyMockActor(groupId);
}

Expand Down
4 changes: 2 additions & 2 deletions ydb/core/blobstorage/dsproxy/mock/dsproxy_mock.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#pragma once

#include "defs.h"

#include <ydb/core/base/id_wrapper.h>
namespace NKikimr {

namespace NFake {
class TProxyDS;
} // NFake

IActor *CreateBlobStorageGroupProxyMockActor(TIntrusivePtr<NFake::TProxyDS> model);
IActor *CreateBlobStorageGroupProxyMockActor(ui32 groupId);
IActor *CreateBlobStorageGroupProxyMockActor(TIdWrapper<ui32, TGroupIdTag> groupId);

} // NKikimr
8 changes: 4 additions & 4 deletions ydb/core/blobstorage/dsproxy/mock/model.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace NKikimr {
namespace NFake {

class TProxyDS : public TThrRefBase {
using TGroupId = TIdWrapper<ui32, TGroupIdTag>;
using TTabletId = ui64;
using TChannel = ui8;
using TGeneration = ui32;
Expand Down Expand Up @@ -56,10 +57,10 @@ namespace NFake {
TMap<TLogoBlobID, TBlob> Blobs;
// By default only NKikimrBlobStorage::StatusIsValid is set
TStorageStatusFlags StorageStatusFlags = TStorageStatusFlags(NKikimrBlobStorage::StatusIsValid);
const ui32 GroupId;
const TGroupId GroupId;

public:
TProxyDS(ui32 groupId = 0)
TProxyDS(TGroupId groupId = TGroupId::Zero())
: GroupId(groupId)
{}

Expand Down Expand Up @@ -265,8 +266,7 @@ namespace NFake {

Y_ABORT_UNLESS(from.TabletID() == to.TabletID());
Y_ABORT_UNLESS(from.Channel() == to.Channel());
Y_ABORT_UNLESS(from.TabletID() == msg->TabletId);

Y_ABORT_UNLESS(from.TabletID() == msg->TabletId);
auto result = std::make_unique<TEvBlobStorage::TEvRangeResult>(NKikimrProto::OK, from, to, GroupId);

auto process = [&](const TLogoBlobID& id, const TString& buffer) {
Expand Down
11 changes: 6 additions & 5 deletions ydb/core/blobstorage/groupinfo/blobstorage_groupinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ TBlobStorageGroupInfo::TDynamicInfo::TDynamicInfo(TGroupId groupId, ui32 groupGe
////////////////////////////////////////////////////////////////////////////
TBlobStorageGroupInfo::TBlobStorageGroupInfo(TBlobStorageGroupType gtype, ui32 numVDisksPerFailDomain,
ui32 numFailDomains, ui32 numFailRealms, const TVector<TActorId> *vdiskIds, EEncryptionMode encryptionMode,
ELifeCyclePhase lifeCyclePhase, TCypherKey key, ui32 groupId)
ELifeCyclePhase lifeCyclePhase, TCypherKey key, TGroupId groupId)
: GroupID(groupId)
, GroupGeneration(1)
, Type(gtype)
Expand Down Expand Up @@ -638,7 +638,7 @@ TIntrusivePtr<TBlobStorageGroupInfo> TBlobStorageGroupInfo::Parse(const NKikimrB
auto erasure = (TBlobStorageGroupType::EErasureSpecies)group.GetErasureSpecies();
TBlobStorageGroupType type(erasure);
TBlobStorageGroupInfo::TTopology topology(type);
TBlobStorageGroupInfo::TDynamicInfo dyn(group.GetGroupID(), group.GetGroupGeneration());
TBlobStorageGroupInfo::TDynamicInfo dyn(TGroupId(group.GetGroupID()), group.GetGroupGeneration());
topology.FailRealms.resize(group.RingsSize());
for (ui32 ringIdx = 0; ringIdx < group.RingsSize(); ++ringIdx) {
const auto& realm = group.GetRings(ringIdx);
Expand Down Expand Up @@ -917,7 +917,8 @@ TString TBlobStorageGroupInfo::ToString() const {


TVDiskID VDiskIDFromVDiskID(const NKikimrBlobStorage::TVDiskID &x) {
return TVDiskID(x.GetGroupID(), x.GetGroupGeneration(), x.GetRing(), x.GetDomain(), x.GetVDisk());
using TGroupId = TIdWrapper<ui32, TGroupIdTag>;
return TVDiskID(TGroupId(x.GetGroupID()), x.GetGroupGeneration(), x.GetRing(), x.GetDomain(), x.GetVDisk());
}

void VDiskIDFromVDiskID(const TVDiskID &id, NKikimrBlobStorage::TVDiskID *proto) {
Expand Down Expand Up @@ -956,8 +957,8 @@ TVDiskID VDiskIDFromString(TString str, bool* isGenerationSet) {
}
groupGeneration = IntFromString<ui32, 10>(parts[1]);
}

return TVDiskID(IntFromString<ui32, 16>(parts[0]),
using TGroupId = TIdWrapper<ui32, TGroupIdTag>;
return TVDiskID(TGroupId(IntFromString<ui32, 16>(parts[0])),
groupGeneration,
IntFromString<ui8, 10>(parts[2]),
IntFromString<ui8, 10>(parts[3]),
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/blobstorage/groupinfo/blobstorage_groupinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ class TBlobStorageGroupInfo : public TThrRefBase {
explicit TBlobStorageGroupInfo(TBlobStorageGroupType gtype, ui32 numVDisksPerFailDomain = 1,
ui32 numFailDomains = 0, ui32 numFailRealms = 1, const TVector<TActorId> *vdiskIds = nullptr,
EEncryptionMode encryptionMode = EEM_ENC_V1, ELifeCyclePhase lifeCyclePhase = ELCP_IN_USE,
TCypherKey key = TCypherKey((const ui8*)"TestKey", 8), ui32 groupId = 0);
TCypherKey key = TCypherKey((const ui8*)"TestKey", 8), TGroupId groupId = TGroupId::Zero());

TBlobStorageGroupInfo(std::shared_ptr<TTopology> topology, TDynamicInfo&& rti, TString storagePoolName,
TMaybe<TKikimrScopeId> acceptedScope, NPDisk::EDeviceType deviceType);
Expand Down
4 changes: 3 additions & 1 deletion ydb/core/blobstorage/incrhuge/incrhuge_keeper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "incrhuge_keeper_recovery_scan.h"
#include <ydb/library/actors/core/actor_bootstrapped.h>
#include <ydb/core/blobstorage/pdisk/blobstorage_pdisk.h>
#include <ydb/core/base/id_wrapper.h>
#include <library/cpp/digest/crc32c/crc32c.h>
#include <library/cpp/monlib/service/pages/templates.h>
#include <util/generic/queue.h>
Expand All @@ -26,8 +27,9 @@ namespace NKikimr {
}

void TKeeper::Bootstrap(const TActorContext& ctx) {
using TGroupId = TIdWrapper<ui32, TGroupIdTag>;
// send yard init message
TVDiskID myVDiskId(~0, ~0, 'H', 'I', 'K');
TVDiskID myVDiskId(TGroupId(~0), ~0, 'H', 'I', 'K');
ctx.Send(State.Settings.PDiskActorId, new NPDisk::TEvYardInit(State.Settings.InitOwnerRound, myVDiskId,
State.Settings.PDiskGuid, ctx.SelfID));
Become(&TKeeper::StateFunc);
Expand Down
1 change: 1 addition & 0 deletions ydb/core/blobstorage/nodewarden/defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <ydb/core/base/appdata.h>
#include <ydb/core/base/tablet_pipe.h>
#include <ydb/core/base/tablet_resolver.h>
#include <ydb/core/base/id_wrapper.h>
#include <ydb/core/blob_depot/agent/agent.h>
#include <ydb/core/node_whiteboard/node_whiteboard.h>
#include <ydb/core/blobstorage/base/blobstorage_events.h>
Expand Down
4 changes: 2 additions & 2 deletions ydb/core/blobstorage/nodewarden/distconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ namespace NKikimr::NStorage {
continue;
}
const auto vdiskId = VDiskIDFromVDiskID(vdisk.GetVDiskID());
const auto it = groups.find(vdiskId.GroupID);
const auto it = groups.find(vdiskId.GroupID.GetRawId());
if (it == groups.end()) {
return makeError(TStringBuilder() << "VDisk " << vdiskId << " does not match any static group");
}
Expand All @@ -604,7 +604,7 @@ namespace NKikimr::NStorage {
const auto [begin, end] = confirm.equal_range(key);
for (auto it = begin; it != end; ++it) {
const TVDiskID& vdiskId = it->second;
TGroupRecord& group = groups.at(vdiskId.GroupID);
TGroupRecord& group = groups.at(vdiskId.GroupID.GetRawId());
group.Confirmed |= {&group.Info->GetTopology(), vdiskId};
}
});
Expand Down
Loading

0 comments on commit 9e5dff8

Please sign in to comment.