diff options
author | alexvru <alexvru@ydb.tech> | 2023-07-07 13:09:35 +0300 |
---|---|---|
committer | alexvru <alexvru@ydb.tech> | 2023-07-07 13:09:35 +0300 |
commit | 54b8a97ea3135cf779e8f55b728467a1f791c4f9 (patch) | |
tree | 874661657f13b4d9d78436aca55984e7a87e0d56 | |
parent | 236db901f46fa6dbd8e9a5507b404d44f84275eb (diff) | |
download | ydb-54b8a97ea3135cf779e8f55b728467a1f791c4f9.tar.gz |
Untie ydb/core/base from blobstorage proto headers KIKIMR-11082
52 files changed, 312 insertions, 200 deletions
diff --git a/ydb/core/base/CMakeLists.darwin-x86_64.txt b/ydb/core/base/CMakeLists.darwin-x86_64.txt index dc2eb3c54bf..e1ec8ea2f29 100644 --- a/ydb/core/base/CMakeLists.darwin-x86_64.txt +++ b/ydb/core/base/CMakeLists.darwin-x86_64.txt @@ -60,6 +60,7 @@ target_sources(ydb-core-base PRIVATE ${CMAKE_SOURCE_DIR}/ydb/core/base/board_replica.cpp ${CMAKE_SOURCE_DIR}/ydb/core/base/blobstorage.cpp ${CMAKE_SOURCE_DIR}/ydb/core/base/counters.cpp + ${CMAKE_SOURCE_DIR}/ydb/core/base/domain.cpp ${CMAKE_SOURCE_DIR}/ydb/core/base/event_filter.cpp ${CMAKE_SOURCE_DIR}/ydb/core/base/group_stat.cpp ${CMAKE_SOURCE_DIR}/ydb/core/base/kikimr_issue.cpp diff --git a/ydb/core/base/CMakeLists.linux-aarch64.txt b/ydb/core/base/CMakeLists.linux-aarch64.txt index 1ea9e10a1b1..240041762fa 100644 --- a/ydb/core/base/CMakeLists.linux-aarch64.txt +++ b/ydb/core/base/CMakeLists.linux-aarch64.txt @@ -61,6 +61,7 @@ target_sources(ydb-core-base PRIVATE ${CMAKE_SOURCE_DIR}/ydb/core/base/board_replica.cpp ${CMAKE_SOURCE_DIR}/ydb/core/base/blobstorage.cpp ${CMAKE_SOURCE_DIR}/ydb/core/base/counters.cpp + ${CMAKE_SOURCE_DIR}/ydb/core/base/domain.cpp ${CMAKE_SOURCE_DIR}/ydb/core/base/event_filter.cpp ${CMAKE_SOURCE_DIR}/ydb/core/base/group_stat.cpp ${CMAKE_SOURCE_DIR}/ydb/core/base/kikimr_issue.cpp diff --git a/ydb/core/base/CMakeLists.linux-x86_64.txt b/ydb/core/base/CMakeLists.linux-x86_64.txt index 1ea9e10a1b1..240041762fa 100644 --- a/ydb/core/base/CMakeLists.linux-x86_64.txt +++ b/ydb/core/base/CMakeLists.linux-x86_64.txt @@ -61,6 +61,7 @@ target_sources(ydb-core-base PRIVATE ${CMAKE_SOURCE_DIR}/ydb/core/base/board_replica.cpp ${CMAKE_SOURCE_DIR}/ydb/core/base/blobstorage.cpp ${CMAKE_SOURCE_DIR}/ydb/core/base/counters.cpp + ${CMAKE_SOURCE_DIR}/ydb/core/base/domain.cpp ${CMAKE_SOURCE_DIR}/ydb/core/base/event_filter.cpp ${CMAKE_SOURCE_DIR}/ydb/core/base/group_stat.cpp ${CMAKE_SOURCE_DIR}/ydb/core/base/kikimr_issue.cpp diff --git a/ydb/core/base/CMakeLists.windows-x86_64.txt b/ydb/core/base/CMakeLists.windows-x86_64.txt index dc2eb3c54bf..e1ec8ea2f29 100644 --- a/ydb/core/base/CMakeLists.windows-x86_64.txt +++ b/ydb/core/base/CMakeLists.windows-x86_64.txt @@ -60,6 +60,7 @@ target_sources(ydb-core-base PRIVATE ${CMAKE_SOURCE_DIR}/ydb/core/base/board_replica.cpp ${CMAKE_SOURCE_DIR}/ydb/core/base/blobstorage.cpp ${CMAKE_SOURCE_DIR}/ydb/core/base/counters.cpp + ${CMAKE_SOURCE_DIR}/ydb/core/base/domain.cpp ${CMAKE_SOURCE_DIR}/ydb/core/base/event_filter.cpp ${CMAKE_SOURCE_DIR}/ydb/core/base/group_stat.cpp ${CMAKE_SOURCE_DIR}/ydb/core/base/kikimr_issue.cpp diff --git a/ydb/core/base/blobstorage.h b/ydb/core/base/blobstorage.h index 8971949e3ee..a2695190636 100644 --- a/ydb/core/base/blobstorage.h +++ b/ydb/core/base/blobstorage.h @@ -10,8 +10,8 @@ #include <ydb/core/base/services/blobstorage_service_id.h> #include <ydb/core/base/blobstorage_grouptype.h> #include <ydb/core/protos/base.pb.h> -#include <ydb/core/protos/blobstorage.pb.h> -#include <ydb/core/protos/blobstorage_config.pb.h> +#include <ydb/core/protos/blobstorage_base.pb.h> +#include <ydb/core/protos/blobstorage_base3.pb.h> #include <ydb/core/util/yverify_stream.h> #include <library/cpp/actors/wilson/wilson_trace.h> diff --git a/ydb/core/base/channel_profiles.h b/ydb/core/base/channel_profiles.h index e10d6a3f91e..735394903b2 100644 --- a/ydb/core/base/channel_profiles.h +++ b/ydb/core/base/channel_profiles.h @@ -1,7 +1,7 @@ #pragma once #include "defs.h" #include <ydb/core/base/blobstorage_grouptype.h> -#include <ydb/core/protos/blobstorage.pb.h> +#include <ydb/core/protos/blobstorage_vdisk_config.pb.h> namespace NKikimr { diff --git a/ydb/core/base/domain.cpp b/ydb/core/base/domain.cpp new file mode 100644 index 00000000000..61505e158d5 --- /dev/null +++ b/ydb/core/base/domain.cpp @@ -0,0 +1,30 @@ +#include "domain.h" +#include <ydb/core/protos/blobstorage_config.pb.h> + +namespace NKikimr { + + TDomainsInfo::TDomain::TDomain(const TString &name, ui32 domainUid, ui64 schemeRootId, + ui32 defaultStateStorageGroup, ui32 defaultSchemeBoardGroup, + TVectorUi32 stateStorageGroup, + TVectorUi64 coordinators, TVectorUi64 mediators, TVectorUi64 allocators, + ui32 defaultHiveUid, TVectorUi32 hivesUids, + ui64 domainPlanResolution, const TStoragePoolKinds *poolTypes) + : DomainUid(domainUid) + , DefaultStateStorageGroup(defaultStateStorageGroup) + , DefaultSchemeBoardGroup(defaultSchemeBoardGroup) + , SchemeRoot(schemeRootId) + , Name(name) + , Coordinators(std::move(coordinators)) + , Mediators(std::move(mediators)) + , TxAllocators(std::move(allocators)) + , StateStorageGroups(std::move(stateStorageGroup)) + , DefaultHiveUid(defaultHiveUid) + , HiveUids(std::move(hivesUids)) + , DomainPlanResolution(domainPlanResolution) + , StoragePoolTypes(poolTypes ? *poolTypes : TStoragePoolKinds()) + {} + + TDomainsInfo::TDomain::~TDomain() + {} + +} // NKikimr diff --git a/ydb/core/base/domain.h b/ydb/core/base/domain.h index 05346e474aa..ed1886f0e7e 100644 --- a/ydb/core/base/domain.h +++ b/ydb/core/base/domain.h @@ -3,12 +3,14 @@ #include "tabletid.h" #include "localdb.h" -#include <ydb/core/protos/blobstorage_config.pb.h> - #include <util/generic/map.h> #include <util/generic/hash.h> #include <util/generic/ptr.h> +namespace NKikimrBlobStorage { + class TDefineStoragePool; +} + namespace NKikimr { struct TDomainsInfo : public TThrRefBase { @@ -100,23 +102,11 @@ struct TDomainsInfo : public TThrRefBase { TVectorUi32 stateStorageGroup, TVectorUi64 coordinators, TVectorUi64 mediators, TVectorUi64 allocators, ui32 defaultHiveUid, TVectorUi32 hivesUids, - ui64 domainPlanResolution, const TStoragePoolKinds &poolTypes) - : DomainUid(domainUid) - , DefaultStateStorageGroup(defaultStateStorageGroup) - , DefaultSchemeBoardGroup(defaultSchemeBoardGroup) - , SchemeRoot(schemeRootId) - , Name(name) - , Coordinators(std::move(coordinators)) - , Mediators(std::move(mediators)) - , TxAllocators(std::move(allocators)) - , StateStorageGroups(std::move(stateStorageGroup)) - , DefaultHiveUid(defaultHiveUid) - , HiveUids(std::move(hivesUids)) - , DomainPlanResolution(domainPlanResolution) - , StoragePoolTypes(poolTypes) - {} + ui64 domainPlanResolution, const TStoragePoolKinds *poolTypes); public: + ~TDomain(); + //interpret coordinatorUids, mediatorUids and allocatorUids as vector uids and call proper MakeTabletId for each template <typename TUidsContainerUi32, typename TUidsContainerUi64> static TDomain::TPtr ConstructDomain(const TString &name, ui32 domainUid, ui64 schemeRoot, @@ -127,7 +117,7 @@ struct TDomainsInfo : public TThrRefBase { const TUidsContainerUi64 &coordinatorUids, const TUidsContainerUi64 &mediatorUids, const TUidsContainerUi64 &allocatorUids, - const TStoragePoolKinds &poolTypes = TStoragePoolKinds()) + const TStoragePoolKinds &poolTypes) { return new TDomain(name, domainUid, schemeRoot, defaultStateStorageGroup, defaultSchemeBoardGroup, @@ -136,7 +126,28 @@ struct TDomainsInfo : public TThrRefBase { MakeMediatrosIds(TVectorUi64(mediatorUids.begin(), mediatorUids.end()), domainUid), MakeAllocatorsIds(TVectorUi64(allocatorUids.begin(), allocatorUids.end()), domainUid), defaultHiveUid, TVectorUi32(hiveUids.begin(), hiveUids.end()), - planResolution, poolTypes); + planResolution, &poolTypes); + } + + //interpret coordinatorUids, mediatorUids and allocatorUids as vector uids and call proper MakeTabletId for each + template <typename TUidsContainerUi32, typename TUidsContainerUi64> + static TDomain::TPtr ConstructDomain(const TString &name, ui32 domainUid, ui64 schemeRoot, + ui32 defaultStateStorageGroup, ui32 defaultSchemeBoardGroup, + const TUidsContainerUi32 &stateStorageGroups, + ui32 defaultHiveUid,const TUidsContainerUi32 &hiveUids, + ui64 planResolution, + const TUidsContainerUi64 &coordinatorUids, + const TUidsContainerUi64 &mediatorUids, + const TUidsContainerUi64 &allocatorUids) + { + return new TDomain(name, domainUid, schemeRoot, + defaultStateStorageGroup, defaultSchemeBoardGroup, + TVectorUi32(stateStorageGroups.begin(), stateStorageGroups.end()), + MakeCoordinatorsIds(TVectorUi64(coordinatorUids.begin(), coordinatorUids.end()), domainUid), + MakeMediatrosIds(TVectorUi64(mediatorUids.begin(), mediatorUids.end()), domainUid), + MakeAllocatorsIds(TVectorUi64(allocatorUids.begin(), allocatorUids.end()), domainUid), + defaultHiveUid, TVectorUi32(hiveUids.begin(), hiveUids.end()), + planResolution, nullptr); } //no any tablets setted @@ -153,7 +164,7 @@ struct TDomainsInfo : public TThrRefBase { TVectorUi64(), TVectorUi64(), defHiveUid, TVectorUi32(1, defHiveUid), - planResolution, TStoragePoolKinds()); + planResolution, nullptr); } template <typename TUidsContainerUi32, typename TUidsContainerUi64> @@ -165,7 +176,27 @@ struct TDomainsInfo : public TThrRefBase { const TUidsContainerUi64 &coordinatorUids, const TUidsContainerUi64 &mediatorUids, const TUidsContainerUi64 &allocatorUids, - const TStoragePoolKinds &poolTypes = TStoragePoolKinds()) + const TStoragePoolKinds &poolTypes) + { + return new TDomain(name, domainUid, schemeRoot, + defaultStateStorageGroup, defaultSchemeBoardGroup, + TVectorUi32(stateStorageGroups.begin(), stateStorageGroups.end()), + TVectorUi64(coordinatorUids.begin(), coordinatorUids.end()), + TVectorUi64(mediatorUids.begin(), mediatorUids.end()), + TVectorUi64(allocatorUids.begin(), allocatorUids.end()), + defaultHiveUid, TVectorUi32(hiveUids.begin(), hiveUids.end()), + planResolution, &poolTypes); + } + + template <typename TUidsContainerUi32, typename TUidsContainerUi64> + static TDomain::TPtr ConstructDomainWithExplicitTabletIds(const TString &name, ui32 domainUid, ui64 schemeRoot, + ui32 defaultStateStorageGroup, ui32 defaultSchemeBoardGroup, + const TUidsContainerUi32 &stateStorageGroups, + ui32 defaultHiveUid,const TUidsContainerUi32 &hiveUids, + ui64 planResolution, + const TUidsContainerUi64 &coordinatorUids, + const TUidsContainerUi64 &mediatorUids, + const TUidsContainerUi64 &allocatorUids) { return new TDomain(name, domainUid, schemeRoot, defaultStateStorageGroup, defaultSchemeBoardGroup, @@ -174,7 +205,7 @@ struct TDomainsInfo : public TThrRefBase { TVectorUi64(mediatorUids.begin(), mediatorUids.end()), TVectorUi64(allocatorUids.begin(), allocatorUids.end()), defaultHiveUid, TVectorUi32(hiveUids.begin(), hiveUids.end()), - planResolution, poolTypes); + planResolution, nullptr); } ui32 DomainRootTag() const { diff --git a/ydb/core/base/group_stat.cpp b/ydb/core/base/group_stat.cpp index b63dee59432..bb32c2bf290 100644 --- a/ydb/core/base/group_stat.cpp +++ b/ydb/core/base/group_stat.cpp @@ -1,3 +1,4 @@ +#include <ydb/core/protos/blobstorage.pb.h> #include "group_stat.h" namespace NKikimr { diff --git a/ydb/core/base/group_stat.h b/ydb/core/base/group_stat.h index 4dfb2600eee..e0556d36e6f 100644 --- a/ydb/core/base/group_stat.h +++ b/ydb/core/base/group_stat.h @@ -2,8 +2,6 @@ #include "defs.h" -#include <ydb/core/protos/blobstorage.pb.h> - #include <util/datetime/base.h> #include <array> @@ -160,14 +158,16 @@ namespace NKikimr { } } - void Serialize(NKikimrBlobStorage::TEvGroupStatReport::TLatencyHistogram *pb) const { + template<typename TProto> + void Serialize(TProto *pb) const { pb->ClearBuckets(); for (ui32 value : Buckets) { pb->AddBuckets(value); } } - bool Deserialize(const NKikimrBlobStorage::TEvGroupStatReport::TLatencyHistogram& pb) { + template<typename TProto> + bool Deserialize(const TProto& pb) { if (pb.BucketsSize() != NumGroupStatBuckets) { return false; } @@ -222,13 +222,15 @@ namespace NKikimr { histogram.Update(sample, now); } - void Serialize(NKikimrBlobStorage::TEvGroupStatReport *pb) const { + template<typename TProto> + void Serialize(TProto *pb) const { PutTabletLog.Serialize(pb->MutablePutTabletLog()); PutUserData.Serialize(pb->MutablePutUserData()); GetFast.Serialize(pb->MutableGetFast()); } - bool Deserialize(const NKikimrBlobStorage::TEvGroupStatReport& pb) { + template<typename TProto> + bool Deserialize(const TProto& pb) { return PutTabletLog.Deserialize(pb.GetPutTabletLog()) && PutUserData.Deserialize(pb.GetPutUserData()) && GetFast.Deserialize(pb.GetGetFast()); diff --git a/ydb/core/base/ya.make b/ydb/core/base/ya.make index cc1114a8495..8a61d7ebc25 100644 --- a/ydb/core/base/ya.make +++ b/ydb/core/base/ya.make @@ -20,6 +20,7 @@ SRCS( counters.cpp counters.h defs.h + domain.cpp domain.h event_filter.cpp event_filter.h diff --git a/ydb/core/blob_depot/agent/defs.h b/ydb/core/blob_depot/agent/defs.h index 1e4cf533f62..09f2cba7af1 100644 --- a/ydb/core/blob_depot/agent/defs.h +++ b/ydb/core/blob_depot/agent/defs.h @@ -9,4 +9,3 @@ #include <ydb/core/util/stlog.h> #include <util/generic/hash_multi_map.h> - diff --git a/ydb/core/blob_depot/blob_depot.h b/ydb/core/blob_depot/blob_depot.h index 19d51e7e263..dce6b29826c 100644 --- a/ydb/core/blob_depot/blob_depot.h +++ b/ydb/core/blob_depot/blob_depot.h @@ -1,6 +1,6 @@ #pragma once -#include "defs.h" +#include <ydb/core/base/blobstorage.h> namespace NKikimr::NBlobDepot { diff --git a/ydb/core/blob_depot/events.h b/ydb/core/blob_depot/events.h index 5f19c5dac05..92d7a9f440e 100644 --- a/ydb/core/blob_depot/events.h +++ b/ydb/core/blob_depot/events.h @@ -1,7 +1,6 @@ #pragma once -#include "defs.h" - +#include <library/cpp/actors/core/event.h> #include <ydb/core/protos/blob_depot.pb.h> namespace NKikimr { diff --git a/ydb/core/blobstorage/base/blobstorage_vdiskid.cpp b/ydb/core/blobstorage/base/blobstorage_vdiskid.cpp index e5a6cb7d42f..bde51be2eea 100644 --- a/ydb/core/blobstorage/base/blobstorage_vdiskid.cpp +++ b/ydb/core/blobstorage/base/blobstorage_vdiskid.cpp @@ -1,4 +1,5 @@ #include "blobstorage_vdiskid.h" +#include <ydb/core/protos/blobstorage.pb.h> namespace NKikimr { @@ -21,6 +22,10 @@ namespace NKikimr { ythrow yexception() << "incorrect format"; } + bool TVDiskID::SameGroupAndGeneration(const NKikimrBlobStorage::TVDiskID &x) const { + return x.GetGroupID() == GroupID && x.GetGroupGeneration() == GroupGeneration; + } + bool TVDiskID::SameDisk(const NKikimrBlobStorage::TVDiskID &x) const { TVDiskID vdisk = VDiskIDFromVDiskID(x); return *this == vdisk; diff --git a/ydb/core/blobstorage/base/blobstorage_vdiskid.h b/ydb/core/blobstorage/base/blobstorage_vdiskid.h index 5cd6a2e463d..16a0c535943 100644 --- a/ydb/core/blobstorage/base/blobstorage_vdiskid.h +++ b/ydb/core/blobstorage/base/blobstorage_vdiskid.h @@ -2,11 +2,13 @@ #include "defs.h" -#include <ydb/core/protos/blobstorage.pb.h> - #include <util/str_stl.h> #include <util/digest/numeric.h> +namespace NKikimrBlobStorage { + class TVDiskID; +} // NKikimrBlobStorage + namespace NKikimr { class TBlobStorageGroupInfo; @@ -40,9 +42,7 @@ struct TVDiskID { return x.GroupID == GroupID && x.GroupGeneration == GroupGeneration; } - bool SameGroupAndGeneration(const NKikimrBlobStorage::TVDiskID &x) const { - return x.GetGroupID() == GroupID && x.GetGroupGeneration() == GroupGeneration; - } + bool SameGroupAndGeneration(const NKikimrBlobStorage::TVDiskID &x) const; bool SameExceptGeneration(const TVDiskID &x) const { return x.GroupID == GroupID && x.FailRealm == FailRealm && x.FailDomain == FailDomain && x.VDisk == VDisk; diff --git a/ydb/core/blobstorage/dsproxy/blobstorage_backoff.cpp b/ydb/core/blobstorage/dsproxy/blobstorage_backoff.cpp index 67165728170..0fe376111f7 100644 --- a/ydb/core/blobstorage/dsproxy/blobstorage_backoff.cpp +++ b/ydb/core/blobstorage/dsproxy/blobstorage_backoff.cpp @@ -1,4 +1,6 @@ #include "blobstorage_backoff.h" +#include <util/generic/utility.h> +#include <util/system/yassert.h> namespace NKikimr { diff --git a/ydb/core/blobstorage/dsproxy/blobstorage_backoff.h b/ydb/core/blobstorage/dsproxy/blobstorage_backoff.h index 50eeba2739a..6701a12e2bf 100644 --- a/ydb/core/blobstorage/dsproxy/blobstorage_backoff.h +++ b/ydb/core/blobstorage/dsproxy/blobstorage_backoff.h @@ -1,5 +1,6 @@ #pragma once -#include "defs.h" + +#include <util/system/types.h> namespace NKikimr { diff --git a/ydb/core/blobstorage/groupinfo/blobstorage_groupinfo.cpp b/ydb/core/blobstorage/groupinfo/blobstorage_groupinfo.cpp index 9ba01fcf679..c029b547b10 100644 --- a/ydb/core/blobstorage/groupinfo/blobstorage_groupinfo.cpp +++ b/ydb/core/blobstorage/groupinfo/blobstorage_groupinfo.cpp @@ -5,6 +5,7 @@ #include "blobstorage_groupinfo_partlayout.h" #include <ydb/core/base/services/blobstorage_service_id.h> #include <ydb/core/blobstorage/vdisk/ingress/blobstorage_ingress.h> +#include <ydb/core/protos/blobstorage.pb.h> #include <library/cpp/actors/core/interconnect.h> diff --git a/ydb/core/blobstorage/groupinfo/blobstorage_groupinfo.h b/ydb/core/blobstorage/groupinfo/blobstorage_groupinfo.h index 186731fb23d..0685921fdcf 100644 --- a/ydb/core/blobstorage/groupinfo/blobstorage_groupinfo.h +++ b/ydb/core/blobstorage/groupinfo/blobstorage_groupinfo.h @@ -7,13 +7,17 @@ #include <ydb/core/base/appdata.h> #include <ydb/core/base/blobstorage.h> #include <ydb/core/base/event_filter.h> -#include <ydb/core/protos/blobstorage.pb.h> +#include <ydb/core/protos/blobstorage_base3.pb.h> #include <ydb/core/util/log_priority_mute_checker.h> #include <util/str_stl.h> #include <util/digest/numeric.h> #include <util/generic/hash_set.h> +namespace NKikimrBlobStorage { + class TGroupInfo; +}; + namespace NActors { class TNodeLocation; } // NActors diff --git a/ydb/core/keyvalue/keyvalue_flat_impl.h b/ydb/core/keyvalue/keyvalue_flat_impl.h index f591d8d124f..e84026b9a27 100644 --- a/ydb/core/keyvalue/keyvalue_flat_impl.h +++ b/ydb/core/keyvalue/keyvalue_flat_impl.h @@ -12,7 +12,6 @@ #include <ydb/core/engine/minikql/flat_local_tx_factory.h> #include <ydb/core/tablet/tablet_counters_aggregator.h> #include <ydb/core/tablet/tablet_counters_protobuf.h> -#include <ydb/core/blobstorage/base/blobstorage_events.h> #include <library/cpp/actors/core/hfunc.h> #include <library/cpp/actors/core/log.h> @@ -21,7 +20,6 @@ #include <ydb/core/base/blobstorage.h> #include <ydb/core/base/tablet_resolver.h> #include <ydb/public/lib/base/msgbus.h> -#include <ydb/core/protos/blobstorage_controller.pb.h> #include <ydb/core/protos/services.pb.h> #include <ydb/core/protos/counters_keyvalue.pb.h> #include <util/string/escape.h> diff --git a/ydb/core/load_test/size_gen.h b/ydb/core/load_test/size_gen.h index 53136b29269..5b0f4214ca2 100644 --- a/ydb/core/load_test/size_gen.h +++ b/ydb/core/load_test/size_gen.h @@ -2,7 +2,6 @@ #include "defs.h" #include "gen.h" -#include <ydb/core/protos/blobstorage.pb.h> namespace NKikimr { namespace NSizeGenerator { diff --git a/ydb/core/mind/bscontroller/bsc.h b/ydb/core/mind/bscontroller/bsc.h index afa641dc094..23dfe36d3e0 100644 --- a/ydb/core/mind/bscontroller/bsc.h +++ b/ydb/core/mind/bscontroller/bsc.h @@ -1,5 +1,6 @@ #pragma once -#include "defs.h" + +#include <ydb/core/base/blobstorage.h> namespace NKikimr { diff --git a/ydb/core/mind/bscontroller/defs.h b/ydb/core/mind/bscontroller/defs.h index a6e70e2ccba..38912f492d6 100644 --- a/ydb/core/mind/bscontroller/defs.h +++ b/ydb/core/mind/bscontroller/defs.h @@ -19,7 +19,6 @@ #include <ydb/core/engine/minikql/flat_local_tx_factory.h> #include <ydb/core/mind/table_adapter.h> #include <ydb/core/protos/blobstorage_config.pb.h> -#include <ydb/core/protos/blobstorage_controller.pb.h> #include <ydb/core/protos/blobstorage.pb.h> #include <ydb/core/protos/counters_bs_controller.pb.h> #include <ydb/core/protos/services.pb.h> diff --git a/ydb/core/mind/bscontroller/layout_helpers.h b/ydb/core/mind/bscontroller/layout_helpers.h index 69490b84efb..36fc2196c22 100644 --- a/ydb/core/mind/bscontroller/layout_helpers.h +++ b/ydb/core/mind/bscontroller/layout_helpers.h @@ -2,10 +2,10 @@ #include "defs.h" -#include <ydb/core/mind/bscontroller/group_layout_checker.h> -#include <ydb/core/mind/bscontroller/group_mapper.h> -#include <ydb/core/mind/bscontroller/group_geometry_info.h> -#include <ydb/core/mind/bscontroller/types.h> +#include "group_layout_checker.h" +#include "group_mapper.h" +#include "group_geometry_info.h" +#include "types.h" namespace NKikimr { diff --git a/ydb/core/mind/hive/hive.h b/ydb/core/mind/hive/hive.h index 8b3e4ad36d0..8791cfb0c48 100644 --- a/ydb/core/mind/hive/hive.h +++ b/ydb/core/mind/hive/hive.h @@ -10,7 +10,6 @@ #include <ydb/core/base/subdomain.h> #include <ydb/core/base/appdata.h> #include <ydb/core/base/tablet_pipe.h> -#include <ydb/core/blobstorage/base/blobstorage_events.h> #include <ydb/core/mind/local.h> #include <ydb/core/protos/counters_hive.pb.h> #include <ydb/core/tablet/tablet_exception.h> diff --git a/ydb/core/protos/CMakeLists.darwin-x86_64.txt b/ydb/core/protos/CMakeLists.darwin-x86_64.txt index adad3d6aa30..467f7222977 100644 --- a/ydb/core/protos/CMakeLists.darwin-x86_64.txt +++ b/ydb/core/protos/CMakeLists.darwin-x86_64.txt @@ -1514,6 +1514,18 @@ get_built_tool_path( cpp_styleguide ) get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( TOOL_enum_parser_bin TOOL_enum_parser_dependency tools/enum_parser/enum_parser @@ -1554,7 +1566,8 @@ target_proto_messages(ydb-core-protos PRIVATE ${CMAKE_SOURCE_DIR}/ydb/core/protos/blob_depot.proto ${CMAKE_SOURCE_DIR}/ydb/core/protos/blob_depot_config.proto ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage.proto - ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage_controller.proto + ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage_base.proto + ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage_base3.proto ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage_disk.proto ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage_disk_color.proto ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage_pdisk_config.proto diff --git a/ydb/core/protos/CMakeLists.linux-aarch64.txt b/ydb/core/protos/CMakeLists.linux-aarch64.txt index fdc2937cd49..6e65dcb88c2 100644 --- a/ydb/core/protos/CMakeLists.linux-aarch64.txt +++ b/ydb/core/protos/CMakeLists.linux-aarch64.txt @@ -1514,6 +1514,18 @@ get_built_tool_path( cpp_styleguide ) get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( TOOL_enum_parser_bin TOOL_enum_parser_dependency tools/enum_parser/enum_parser @@ -1555,7 +1567,8 @@ target_proto_messages(ydb-core-protos PRIVATE ${CMAKE_SOURCE_DIR}/ydb/core/protos/blob_depot.proto ${CMAKE_SOURCE_DIR}/ydb/core/protos/blob_depot_config.proto ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage.proto - ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage_controller.proto + ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage_base.proto + ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage_base3.proto ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage_disk.proto ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage_disk_color.proto ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage_pdisk_config.proto diff --git a/ydb/core/protos/CMakeLists.linux-x86_64.txt b/ydb/core/protos/CMakeLists.linux-x86_64.txt index fdc2937cd49..6e65dcb88c2 100644 --- a/ydb/core/protos/CMakeLists.linux-x86_64.txt +++ b/ydb/core/protos/CMakeLists.linux-x86_64.txt @@ -1514,6 +1514,18 @@ get_built_tool_path( cpp_styleguide ) get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( TOOL_enum_parser_bin TOOL_enum_parser_dependency tools/enum_parser/enum_parser @@ -1555,7 +1567,8 @@ target_proto_messages(ydb-core-protos PRIVATE ${CMAKE_SOURCE_DIR}/ydb/core/protos/blob_depot.proto ${CMAKE_SOURCE_DIR}/ydb/core/protos/blob_depot_config.proto ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage.proto - ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage_controller.proto + ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage_base.proto + ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage_base3.proto ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage_disk.proto ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage_disk_color.proto ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage_pdisk_config.proto diff --git a/ydb/core/protos/CMakeLists.windows-x86_64.txt b/ydb/core/protos/CMakeLists.windows-x86_64.txt index adad3d6aa30..467f7222977 100644 --- a/ydb/core/protos/CMakeLists.windows-x86_64.txt +++ b/ydb/core/protos/CMakeLists.windows-x86_64.txt @@ -1514,6 +1514,18 @@ get_built_tool_path( cpp_styleguide ) get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( TOOL_enum_parser_bin TOOL_enum_parser_dependency tools/enum_parser/enum_parser @@ -1554,7 +1566,8 @@ target_proto_messages(ydb-core-protos PRIVATE ${CMAKE_SOURCE_DIR}/ydb/core/protos/blob_depot.proto ${CMAKE_SOURCE_DIR}/ydb/core/protos/blob_depot_config.proto ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage.proto - ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage_controller.proto + ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage_base.proto + ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage_base3.proto ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage_disk.proto ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage_disk_color.proto ${CMAKE_SOURCE_DIR}/ydb/core/protos/blobstorage_pdisk_config.proto diff --git a/ydb/core/protos/blobstorage.proto b/ydb/core/protos/blobstorage.proto index 6e9f593a35e..c962ede23fd 100644 --- a/ydb/core/protos/blobstorage.proto +++ b/ydb/core/protos/blobstorage.proto @@ -1,6 +1,8 @@ import "library/cpp/actors/protos/actors.proto"; import "library/cpp/actors/protos/interconnect.proto"; import "ydb/core/protos/base.proto"; +import "ydb/core/protos/blobstorage_base.proto"; +import "ydb/core/protos/blobstorage_base3.proto"; import "ydb/core/protos/blobstorage_vdisk_config.proto"; import "ydb/core/protos/blobstorage_pdisk_config.proto"; import "ydb/core/protos/blobstorage_config.proto"; @@ -10,63 +12,12 @@ import "ydb/core/protos/blobstorage_disk_color.proto"; package NKikimrBlobStorage; option java_package = "ru.yandex.kikimr.proto"; -// VDisk handle and store LogoBlobs in different ways, below we define several classes of these blobs -enum EPutHandleClass { - TabletLog = 1; // usually small size, requires low latency, rarely read sequentially (RT/TMP) - AsyncBlob = 2; // async blobs, usually sstables and their parts (NoneRT/NoneTMP) - UserData = 3; // user data that we write as separate blobs (RT/NoneTMP) - - // NOTE: currently NoneRT/TMP blobs must be treated as AsyncBlob -} - -// VDisk handle read of LogoBlobs in different ways, below we define several classes of these requests -enum EGetHandleClass { - AsyncRead = 1; // read of tablet's compacted data - FastRead = 2; // reads initiated by the user (fast) - Discover = 3; // reads from Discover query (OOB) - LowRead = 4; // background reads initiabed by the user (should not affect TabletLog and FastRead) -} - message TMessageId { // (SequenceId, MsgId) pair identifies message order, used to implement flow control (i.e. windows) optional uint64 SequenceId = 1; optional uint64 MsgId = 2; } -enum EVDiskQueueId { - option allow_alias = true; - - Unknown = 0; - // EPutHandleClass - PutTabletLog = 1; - PutAsyncBlob = 2; - PutUserData = 3; - // EGetHandleClass - GetAsyncRead = 4; - GetFastRead = 5; - GetDiscover = 6; - GetLowRead = 7; - - // Declare Begin and End last in order to get real names from EVDiskQueueId_Name() - Begin = 1; - End = 8; -}; - -enum EVDiskInternalQueueId { - option allow_alias = true; - - IntUnknown = 0; - IntBegin = 1; - IntGetAsync = 1; - IntGetFast = 2; - IntPutLog = 3; - IntPutHugeForeground = 4; - IntPutHugeBackground = 5; - IntGetDiscover = 6; - IntLowRead = 7; - IntEnd = 8; -}; - message TVDiskCostSettings { optional uint64 SeekTimeUs = 1; optional uint64 ReadSpeedBps = 2; @@ -113,8 +64,8 @@ message TMsgQoS { optional uint32 DeadlineSeconds = 1; optional TMessageId MsgId = 2; optional uint64 Cost = 3; - optional EVDiskQueueId ExtQueueId = 5; - optional EVDiskInternalQueueId IntQueueId = 6; + optional NKikimrBlobStorage.EVDiskQueueId ExtQueueId = 5; + optional NKikimrBlobStorage.EVDiskInternalQueueId IntQueueId = 6; optional TVDiskCostSettings CostSettings = 7; optional bool SendMeCostSettings = 8; optional TWindowFeedback Window = 9; @@ -130,27 +81,11 @@ message TMsgQoS { // message VDisk sends to the client, when backpressure window changes message TEvVWindowChange { - optional EVDiskQueueId FrontQueueId = 1; + optional NKikimrBlobStorage.EVDiskQueueId FrontQueueId = 1; optional TWindowFeedback Window = 2; optional bool DropConnection = 3; // emergency connection drop } -// status flags we provide in responses -enum EStatusFlags { // Never use this type for storage, use ui32 bitset - StatusIsValid = 1; // 0000 0000 0001, if not set, status flags could not be obtained - StatusDiskSpaceCyan = 128; // 0000 1000 0000 - StatusDiskSpaceLightYellowMove = 2; // 0000 0000 0010 - StatusDiskSpaceYellowStop = 512; // 0010 0000 0000 - StatusDiskSpaceLightOrange = 256; // 0001 0000 0000 - StatusDiskSpacePreOrange = 1024; // 0100 0000 0000 - StatusDiskSpaceOrange = 4; // 0000 0000 0100 - StatusDiskSpaceRed = 8; // 0000 0000 1000 - StatusDiskSpaceBlack = 64; // 0000 0100 0000 - StatusMaskDiskSpace = 1998; // 0111 1100 1110 - StatusNewOwner = 16; // 0000 0001 0000 - StatusNotEnoughDiskSpaceForOperation = 32; // 0000 0010 0000 -} - message TTimestamps { optional uint64 SentByDSProxyUs = 1 [default = 0]; optional uint64 ReceivedByVDiskUs = 2 [default = 0]; @@ -199,7 +134,7 @@ message TEvVPatchStart { optional bool NotifyIfNotReady = 4; optional uint64 Cookie = 5; - optional EGetHandleClass HandleClass = 6; + optional NKikimrBlobStorage.EGetHandleClass HandleClass = 6; optional TMsgQoS MsgQoS = 10; optional TTimestamps Timestamps = 23; @@ -245,7 +180,7 @@ message TEvVPatchDiff { optional bool ForceEnd = 8; optional bool NotifyIfNotReady = 9; - optional EPutHandleClass HandleClass = 11; + optional NKikimrBlobStorage.EPutHandleClass HandleClass = 11; optional TMsgQoS MsgQoS = 10; optional TTimestamps Timestamps = 23; @@ -260,7 +195,7 @@ message TEvVPatchXorDiff { optional uint32 FromPartId = 6; optional bool NotifyIfNotReady = 7; - optional EPutHandleClass HandleClass = 8; + optional NKikimrBlobStorage.EPutHandleClass HandleClass = 8; optional TMsgQoS MsgQoS = 10; optional TTimestamps Timestamps = 23; @@ -378,7 +313,7 @@ message TEvVPut { optional bool IgnoreBlock = 5; optional bool NotifyIfNotReady = 6; optional uint64 Cookie = 7; - optional EPutHandleClass HandleClass = 9; + optional NKikimrBlobStorage.EPutHandleClass HandleClass = 9; optional TMsgQoS MsgQoS = 10; optional TTimestamps Timestamps = 23; @@ -423,7 +358,7 @@ message TEvVMultiPut { optional bool IgnoreBlock = 3 [default = false]; optional bool NotifyIfNotReady = 4; optional uint64 Cookie = 5; - optional EPutHandleClass HandleClass = 6; + optional NKikimrBlobStorage.EPutHandleClass HandleClass = 6; optional TMsgQoS MsgQoS = 10; optional TTimestamps Timestamps = 23; } @@ -483,7 +418,7 @@ message TEvVGet { optional uint64 Cookie = 9; optional TMsgQoS MsgQoS = 10; optional bool IndexOnly = 12 [default = false]; - optional EGetHandleClass HandleClass = 13; + optional NKikimrBlobStorage.EGetHandleClass HandleClass = 13; optional bool SuppressBarrierCheck = 20 [default = false]; // set to true to prevent hull from validating barriers diff --git a/ydb/core/protos/blobstorage_base.proto b/ydb/core/protos/blobstorage_base.proto new file mode 100644 index 00000000000..d4915b01769 --- /dev/null +++ b/ydb/core/protos/blobstorage_base.proto @@ -0,0 +1,68 @@ +package NKikimrBlobStorage; + +// VDisk handle and store LogoBlobs in different ways, below we define several classes of these blobs +enum EPutHandleClass { + TabletLog = 1; // usually small size, requires low latency, rarely read sequentially (RT/TMP) + AsyncBlob = 2; // async blobs, usually sstables and their parts (NoneRT/NoneTMP) + UserData = 3; // user data that we write as separate blobs (RT/NoneTMP) + + // NOTE: currently NoneRT/TMP blobs must be treated as AsyncBlob +} + +// VDisk handle read of LogoBlobs in different ways, below we define several classes of these requests +enum EGetHandleClass { + AsyncRead = 1; // read of tablet's compacted data + FastRead = 2; // reads initiated by the user (fast) + Discover = 3; // reads from Discover query (OOB) + LowRead = 4; // background reads initiabed by the user (should not affect TabletLog and FastRead) +} + +enum EVDiskQueueId { + option allow_alias = true; + + Unknown = 0; + // EPutHandleClass + PutTabletLog = 1; + PutAsyncBlob = 2; + PutUserData = 3; + // EGetHandleClass + GetAsyncRead = 4; + GetFastRead = 5; + GetDiscover = 6; + GetLowRead = 7; + + // Declare Begin and End last in order to get real names from EVDiskQueueId_Name() + Begin = 1; + End = 8; +}; + +enum EVDiskInternalQueueId { + option allow_alias = true; + + IntUnknown = 0; + IntBegin = 1; + IntGetAsync = 1; + IntGetFast = 2; + IntPutLog = 3; + IntPutHugeForeground = 4; + IntPutHugeBackground = 5; + IntGetDiscover = 6; + IntLowRead = 7; + IntEnd = 8; +}; + +// status flags we provide in responses +enum EStatusFlags { // Never use this type for storage, use ui32 bitset + StatusIsValid = 1; // 0000 0000 0001, if not set, status flags could not be obtained + StatusDiskSpaceCyan = 128; // 0000 1000 0000 + StatusDiskSpaceLightYellowMove = 2; // 0000 0000 0010 + StatusDiskSpaceYellowStop = 512; // 0010 0000 0000 + StatusDiskSpaceLightOrange = 256; // 0001 0000 0000 + StatusDiskSpacePreOrange = 1024; // 0100 0000 0000 + StatusDiskSpaceOrange = 4; // 0000 0000 0100 + StatusDiskSpaceRed = 8; // 0000 0000 1000 + StatusDiskSpaceBlack = 64; // 0000 0100 0000 + StatusMaskDiskSpace = 1998; // 0111 1100 1110 + StatusNewOwner = 16; // 0000 0001 0000 + StatusNotEnoughDiskSpaceForOperation = 32; // 0000 0010 0000 +} diff --git a/ydb/core/protos/blobstorage_base3.proto b/ydb/core/protos/blobstorage_base3.proto new file mode 100644 index 00000000000..07c20ac8895 --- /dev/null +++ b/ydb/core/protos/blobstorage_base3.proto @@ -0,0 +1,28 @@ +syntax = "proto3"; + +package NKikimrBlobStorage; + +// Enum defining PDisk underlying drive type (rotational or solid state) +enum EPDiskType { + ROT = 0; // rotational drives (HDD) + SSD = 1; // solid state drives (SSD) + NVME = 2; // PCIe-connected solid state drives (NVMe SSD) + UNKNOWN_TYPE = 3; // used if device type is unknown or if group consists of different PDisk device types +} + +// Virtual group life cycle state +enum EVirtualGroupState { + NEW = 0; // just created + CREATE_FAILED = 1; // error while creating VirtualGroup + WORKING = 2; // operational + DELETING = 3; // going to delete from Hive +} + +message TGroupDecommitStatus { + enum E { + NONE = 0; // no decomission + PENDING = 1; // decommission machinery is starting + IN_PROGRESS = 2; // decomission underway + DONE = 3; // group decomission complete + } +} diff --git a/ydb/core/protos/blobstorage_config.proto b/ydb/core/protos/blobstorage_config.proto index 251ffa44677..35c3e5d8828 100644 --- a/ydb/core/protos/blobstorage_config.proto +++ b/ydb/core/protos/blobstorage_config.proto @@ -1,5 +1,6 @@ syntax = "proto3"; +import "ydb/core/protos/blobstorage_base3.proto"; import "ydb/core/protos/blobstorage_disk.proto"; import "ydb/core/protos/blobstorage_disk_color.proto"; import "ydb/core/protos/blobstorage_pdisk_config.proto"; @@ -8,31 +9,6 @@ import "library/cpp/actors/protos/interconnect.proto"; package NKikimrBlobStorage; -// Enum defining PDisk underlying drive type (rotational or solid state) -enum EPDiskType { - ROT = 0; // rotational drives (HDD) - SSD = 1; // solid state drives (SSD) - NVME = 2; // PCIe-connected solid state drives (NVMe SSD) - UNKNOWN_TYPE = 3; // used if device type is unknown or if group consists of different PDisk device types -} - -// Virtual group life cycle state -enum EVirtualGroupState { - NEW = 0; // just created - CREATE_FAILED = 1; // error while creating VirtualGroup - WORKING = 2; // operational - DELETING = 3; // going to delete from Hive -} - -message TGroupDecommitStatus { - enum E { - NONE = 0; // no decomission - PENDING = 1; // decommission machinery is starting - IN_PROGRESS = 2; // decomission underway - DONE = 3; // group decomission complete - } -} - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // TYPICAL HOST CONFIGURATIONS //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -40,7 +16,7 @@ message TGroupDecommitStatus { // Single drive descriptor of typical host configuration structure message THostConfigDrive { string Path = 1; // path to the device on the host node - EPDiskType Type = 2; // drive type (rotational or solid state) + NKikimrBlobStorage.EPDiskType Type = 2; // drive type (rotational or solid state) bool SharedWithOs = 3; // is this drive shared with OS in any way? (i.e. has OS partitions) bool ReadCentric = 4; // is this drive read-centric? uint64 Kind = 5; // nontransparent user-defined kind used for filtering when picking up groups @@ -147,7 +123,7 @@ message TGroupUsagePattern { message TPDiskFilter { message TRequiredProperty { oneof Property { - EPDiskType Type = 1; // require certain drive type + NKikimrBlobStorage.EPDiskType Type = 1; // require certain drive type bool SharedWithOs = 2; // require certain SharedWithOs property bool ReadCentric = 3; // require certain ReadCentric property uint64 Kind = 4; // require certain kind @@ -430,7 +406,7 @@ message TAddDriveSerial { string Serial = 1; uint64 BoxId = 2; uint64 Kind = 3; - EPDiskType PDiskType = 4; // default UNKNOWN type implies auto-detection of drive type + NKikimrBlobStorage.EPDiskType PDiskType = 4; // default UNKNOWN type implies auto-detection of drive type NKikimrBlobStorage.TPDiskConfig PDiskConfig = 5; } @@ -603,7 +579,7 @@ message TBaseConfig { uint32 NodeId = 1; uint32 PDiskId = 2; string Path = 3; - EPDiskType Type = 4; + NKikimrBlobStorage.EPDiskType Type = 4; ETriStateBool SharedWithOs = 5; ETriStateBool ReadCentric = 6; uint64 Kind = 7; @@ -640,11 +616,11 @@ message TBaseConfig { bool Ready = 12; // is disk READY in terms of BSC (stable READY status for some period of time) } message TVirtualGroupInfo { - EVirtualGroupState State = 1; + NKikimrBlobStorage.EVirtualGroupState State = 1; string Name = 2; uint64 BlobDepotId = 3; string ErrorReason = 4; - TGroupDecommitStatus.E DecommitStatus = 5; + NKikimrBlobStorage.TGroupDecommitStatus.E DecommitStatus = 5; } message TGroup { uint32 GroupId = 1; @@ -674,7 +650,7 @@ message TBaseConfig { uint32 NodeId = 3; uint32 PDiskId = 4; string Path = 5; - EPDiskType Type = 6; + NKikimrBlobStorage.EPDiskType Type = 6; uint64 Guid = 7; TDriveLifeStage.E LifeStage = 8; } diff --git a/ydb/core/protos/blobstorage_controller.proto b/ydb/core/protos/blobstorage_controller.proto deleted file mode 100644 index 40f0e814d00..00000000000 --- a/ydb/core/protos/blobstorage_controller.proto +++ /dev/null @@ -1,25 +0,0 @@ -package NKikimrBlobStorage; -option java_package = "ru.yandex.kikimr.proto"; - -message TTransaction { - message TInitScheme { - optional bytes Script = 1; - } - - message TCreatePDisk { - optional bytes Script = 1; - } - - message TCreateVDiskSlots { - optional bytes Script = 1; - } - - message TCreateGroup { - optional bytes Script = 1; - } - - optional TInitScheme TxInitScheme = 1; - optional TCreatePDisk TxCreatePDisk = 2; - optional TCreateVDiskSlots TxCreateVDiskSlots = 3; - optional TCreateGroup TxCreateGroup = 4; -} diff --git a/ydb/core/protos/load_test.proto b/ydb/core/protos/load_test.proto index 8e5ec4a9a65..b4be30777c9 100644 --- a/ydb/core/protos/load_test.proto +++ b/ydb/core/protos/load_test.proto @@ -1,4 +1,5 @@ import "ydb/core/protos/blobstorage.proto"; +import "ydb/core/protos/blobstorage_base.proto"; import "ydb/core/protos/blobstorage_disk.proto"; import "ydb/core/protos/datashard_load.proto"; diff --git a/ydb/core/protos/ya.make b/ydb/core/protos/ya.make index 7b4f840f2e3..f4268c8c930 100644 --- a/ydb/core/protos/ya.make +++ b/ydb/core/protos/ya.make @@ -13,7 +13,8 @@ SRCS( blob_depot.proto blob_depot_config.proto blobstorage.proto - blobstorage_controller.proto + blobstorage_base.proto + blobstorage_base3.proto blobstorage_disk.proto blobstorage_disk_color.proto blobstorage_pdisk_config.proto diff --git a/ydb/core/testlib/test_client.cpp b/ydb/core/testlib/test_client.cpp index 35a79f502bd..ff445695098 100644 --- a/ydb/core/testlib/test_client.cpp +++ b/ydb/core/testlib/test_client.cpp @@ -34,6 +34,7 @@ #include <ydb/services/monitoring/grpc_service.h> #include <ydb/core/fq/libs/control_plane_proxy/control_plane_proxy.h> #include <ydb/core/fq/libs/control_plane_storage/control_plane_storage.h> +#include <ydb/core/blobstorage/base/blobstorage_events.h> #include <ydb/core/client/metadata/types_metadata.h> #include <ydb/core/client/metadata/functions_metadata.h> #include <ydb/core/client/minikql_compile/mkql_compile_service.h> diff --git a/ydb/core/viewer/browse.h b/ydb/core/viewer/browse.h index 6744dafe049..417419f57c1 100644 --- a/ydb/core/viewer/browse.h +++ b/ydb/core/viewer/browse.h @@ -5,7 +5,6 @@ #include <ydb/core/base/hive.h> #include <ydb/core/base/tablet.h> #include <ydb/core/base/tablet_pipe.h> -#include <ydb/core/blobstorage/base/blobstorage_events.h> #include <ydb/core/protos/services.pb.h> #include <ydb/core/tx/schemeshard/schemeshard.h> #include <ydb/core/tx/tx_proxy/proxy.h> diff --git a/ydb/core/viewer/json_blobindexstat.h b/ydb/core/viewer/json_blobindexstat.h index 848a7984d92..ae916700b87 100644 --- a/ydb/core/viewer/json_blobindexstat.h +++ b/ydb/core/viewer/json_blobindexstat.h @@ -2,7 +2,6 @@ #include <library/cpp/actors/core/actor_bootstrapped.h> #include <library/cpp/actors/core/interconnect.h> #include <library/cpp/actors/core/mon.h> -#include <ydb/core/blobstorage/vdisk/common/vdisk_events.h> #include <ydb/core/protos/services.pb.h> #include <ydb/core/node_whiteboard/node_whiteboard.h> #include <ydb/core/util/tuples.h> diff --git a/ydb/core/viewer/json_bscontrollerinfo.h b/ydb/core/viewer/json_bscontrollerinfo.h index f8fd43ca658..17ce4e6feac 100644 --- a/ydb/core/viewer/json_bscontrollerinfo.h +++ b/ydb/core/viewer/json_bscontrollerinfo.h @@ -2,7 +2,6 @@ #include <library/cpp/actors/core/actor_bootstrapped.h> #include <library/cpp/actors/core/interconnect.h> #include <library/cpp/actors/core/mon.h> -#include <ydb/core/blobstorage/base/blobstorage_events.h> #include <ydb/core/base/tablet_pipe.h> #include <ydb/core/protos/services.pb.h> #include "viewer.h" diff --git a/ydb/core/viewer/json_getblob.h b/ydb/core/viewer/json_getblob.h index 94ce3299495..9f7951c89ad 100644 --- a/ydb/core/viewer/json_getblob.h +++ b/ydb/core/viewer/json_getblob.h @@ -2,7 +2,6 @@ #include <library/cpp/actors/core/actor_bootstrapped.h> #include <library/cpp/actors/core/interconnect.h> #include <library/cpp/actors/core/mon.h> -#include <ydb/core/blobstorage/vdisk/common/vdisk_events.h> #include <ydb/core/protos/services.pb.h> #include <ydb/core/node_whiteboard/node_whiteboard.h> #include <ydb/core/util/tuples.h> diff --git a/ydb/core/viewer/json_handlers_vdisk.cpp b/ydb/core/viewer/json_handlers_vdisk.cpp index 642414fc906..da58dcf4356 100644 --- a/ydb/core/viewer/json_handlers_vdisk.cpp +++ b/ydb/core/viewer/json_handlers_vdisk.cpp @@ -1,3 +1,6 @@ +#include <ydb/core/blobstorage/vdisk/common/vdisk_events.h> +#include <ydb/core/blobstorage/base/blobstorage_events.h> + #include "json_handlers.h" #include "json_vdiskstat.h" diff --git a/ydb/core/viewer/json_handlers_viewer.cpp b/ydb/core/viewer/json_handlers_viewer.cpp index daa64a165e2..518c18eb2d0 100644 --- a/ydb/core/viewer/json_handlers_viewer.cpp +++ b/ydb/core/viewer/json_handlers_viewer.cpp @@ -1,3 +1,5 @@ +#include <ydb/core/blobstorage/base/blobstorage_events.h> + #include "json_handlers.h" #include "json_nodelist.h" diff --git a/ydb/core/viewer/json_healthcheck.h b/ydb/core/viewer/json_healthcheck.h index 03abb5da30b..e241fce91b9 100644 --- a/ydb/core/viewer/json_healthcheck.h +++ b/ydb/core/viewer/json_healthcheck.h @@ -2,7 +2,6 @@ #include <library/cpp/actors/core/actor_bootstrapped.h> #include <library/cpp/actors/core/interconnect.h> #include <library/cpp/actors/core/mon.h> -#include <ydb/core/blobstorage/base/blobstorage_events.h> #include <ydb/core/base/tablet_pipe.h> #include <ydb/core/protos/services.pb.h> #include "viewer.h" diff --git a/ydb/core/viewer/json_metainfo.h b/ydb/core/viewer/json_metainfo.h index 61b0f8097f1..afaf711390b 100644 --- a/ydb/core/viewer/json_metainfo.h +++ b/ydb/core/viewer/json_metainfo.h @@ -8,7 +8,6 @@ #include <ydb/core/base/hive.h> #include <ydb/core/base/tablet.h> #include <ydb/core/base/tablet_pipe.h> -#include <ydb/core/blobstorage/base/blobstorage_events.h> #include <ydb/core/protos/services.pb.h> #include <ydb/core/tablet/tablet_counters_aggregator.h> #include <ydb/core/tx/schemeshard/schemeshard.h> diff --git a/ydb/core/viewer/json_pipe_req.h b/ydb/core/viewer/json_pipe_req.h index 8946e3d5a1d..705c0dd15b4 100644 --- a/ydb/core/viewer/json_pipe_req.h +++ b/ydb/core/viewer/json_pipe_req.h @@ -6,7 +6,6 @@ #include <ydb/core/cms/console/console.h> #include <ydb/core/base/hive.h> #include <ydb/core/base/statestorage.h> -#include <ydb/core/blobstorage/base/blobstorage_events.h> #include <ydb/core/tx/scheme_cache/scheme_cache.h> #include <ydb/core/tx/schemeshard/schemeshard.h> #include <ydb/core/tx/tx_proxy/proxy.h> diff --git a/ydb/core/viewer/json_vdisk_req.h b/ydb/core/viewer/json_vdisk_req.h index 3a6c3d08844..13d7fb3c3f6 100644 --- a/ydb/core/viewer/json_vdisk_req.h +++ b/ydb/core/viewer/json_vdisk_req.h @@ -4,7 +4,6 @@ #include <library/cpp/actors/core/mon.h> #include <ydb/core/protos/services.pb.h> #include <ydb/core/viewer/json/json.h> -#include <ydb/core/blobstorage/vdisk/common/vdisk_events.h> #include "viewer.h" #include "json_pipe_req.h" diff --git a/ydb/core/viewer/json_vdiskstat.h b/ydb/core/viewer/json_vdiskstat.h index f1a8e3f7256..be0e0d6e212 100644 --- a/ydb/core/viewer/json_vdiskstat.h +++ b/ydb/core/viewer/json_vdiskstat.h @@ -2,7 +2,6 @@ #include <library/cpp/actors/core/actor_bootstrapped.h> #include <library/cpp/actors/core/interconnect.h> #include <library/cpp/actors/core/mon.h> -#include <ydb/core/blobstorage/vdisk/common/vdisk_events.h> #include <ydb/core/protos/services.pb.h> #include <ydb/core/node_whiteboard/node_whiteboard.h> #include <ydb/core/util/tuples.h> diff --git a/ydb/core/viewer/viewer.cpp b/ydb/core/viewer/viewer.cpp index 166ad5fd867..4d8fd79f9dd 100644 --- a/ydb/core/viewer/viewer.cpp +++ b/ydb/core/viewer/viewer.cpp @@ -1,4 +1,4 @@ - +#include <ydb/core/blobstorage/base/blobstorage_events.h> #include <library/cpp/actors/core/actor_bootstrapped.h> #include <ydb/core/mon/mon.h> #include <library/cpp/actors/core/mon.h> diff --git a/ydb/core/viewer/viewer_request.cpp b/ydb/core/viewer/viewer_request.cpp index 4a9252021b5..fa040407c88 100644 --- a/ydb/core/viewer/viewer_request.cpp +++ b/ydb/core/viewer/viewer_request.cpp @@ -1,3 +1,5 @@ +#include <ydb/core/blobstorage/base/blobstorage_events.h> + #include "viewer_request.h" #include "wb_req.h" diff --git a/ydb/core/viewer/viewer_ut.cpp b/ydb/core/viewer/viewer_ut.cpp index c7fe51c4f3c..f87f842057d 100644 --- a/ydb/core/viewer/viewer_ut.cpp +++ b/ydb/core/viewer/viewer_ut.cpp @@ -5,6 +5,7 @@ #include <library/cpp/json/json_reader.h> #include <util/stream/null.h> #include <ydb/core/viewer/protos/viewer.pb.h> +#include <ydb/core/blobstorage/base/blobstorage_events.h> #include "json_handlers.h" #include "json_tabletinfo.h" #include "json_vdiskinfo.h" |