From 09890828eb132fa4567f7d2ecf46ec7d2c8994e6 Mon Sep 17 00:00:00 2001 From: Alexander Rutkovsky Date: Tue, 5 Mar 2024 17:52:00 +0300 Subject: Fix sync (#2461) --- ydb/core/base/domain.h | 23 +++++++++++++++++++++++ ydb/core/base/tabletid.h | 4 ++++ ydb/core/testlib/basics/appdata.h | 1 + ydb/core/testlib/tablet_helpers.h | 6 ++++++ 4 files changed, 34 insertions(+) diff --git a/ydb/core/base/domain.h b/ydb/core/base/domain.h index 73a842662af..90006d0bf6c 100644 --- a/ydb/core/base/domain.h +++ b/ydb/core/base/domain.h @@ -120,6 +120,16 @@ struct TDomainsInfo : public TThrRefBase { ui32 DomainRootTag() const { return DomainUid + FirstUserTag; } + + // NEVER USE THIS + /*[[deprecated]]*/ ui32 GetHiveUidByIdx(ui32) const { return 0; } + /*[[deprecated]]*/ static constexpr ui32 DefaultStateStorageGroup = 1; + /*[[deprecated]]*/ static constexpr ui32 DefaultHiveUid = 1; + template + /*[[deprecated]]*/ static TDomain::TPtr ConstructDomainWithExplicitTabletIds(const TString &name, ui32 domainUid, + ui64 schemeRoot, ui32, ui32, TVector, ui32, TVector, TOtherArgs&&... args) { + return ConstructDomainWithExplicitTabletIds(name, domainUid, schemeRoot, std::forward(args)...); + } }; TIntrusivePtr Domain; @@ -147,6 +157,7 @@ struct TDomainsInfo : public TThrRefBase { void AddDomain(TDomain *domain) { Y_ABORT_UNLESS(!Domain); Domain = domain; + Domains.emplace(domain->DomainUid, domain); } void AddHive(ui64 hive) { @@ -157,6 +168,7 @@ struct TDomainsInfo : public TThrRefBase { void ClearDomainsAndHive() { Domain.Reset(); HiveTabletId.reset(); + Domains.clear(); } const TDomain& GetDomain(ui32 domainUid) const { @@ -177,6 +189,17 @@ struct TDomainsInfo : public TThrRefBase { ui64 GetHive() const { return HiveTabletId.value_or(BadTabletId); } + + // NEVER USE THIS + THashMap Domains; + /*[[deprecated]]*/ ui64 GetHive(ui32) const { return GetHive(); } + /*[[deprecated]]*/ ui32 GetDomainUidByTabletId(ui64) const { return GetDomain()->DomainUid; } + /*[[deprecated]]*/ ui32 GetDefaultHiveUid(ui32) const { return TDomain::DefaultHiveUid; } + /*[[deprecated]]*/ void AddHive(ui32, ui64 hive) { AddHive(hive); } + /*[[deprecated]]*/ static ui64 MakeTxCoordinatorID(ui32, ui32 uid) { return MakeTxCoordinatorIDFixed(uid); } + /*[[deprecated]]*/ static ui64 MakeTxCoordinatorIDFixed(ui32, ui32 uid) { return MakeTxCoordinatorIDFixed(uid); } + /*[[deprecated]]*/ static ui64 MakeTxMediatorID(ui32, ui32 uid) { return MakeTxMediatorIDFixed(uid); } + /*[[deprecated]]*/ static ui64 MakeTxAllocatorID(ui32, ui32 uid) { return MakeTxAllocatorIDFixed(uid); } }; } diff --git a/ydb/core/base/tabletid.h b/ydb/core/base/tabletid.h index 534fe9e5164..c62f063cdb1 100644 --- a/ydb/core/base/tabletid.h +++ b/ydb/core/base/tabletid.h @@ -84,4 +84,8 @@ namespace NKikimr { return TActorId(0, TStringBuf(x, 12)); } + // NEVER USE THIS + /*[[deprecated]]*/ inline ui64 MakeBSControllerID(ui32) { return MakeBSControllerID(); } + /*[[deprecated]]*/ inline ui64 MakeDefaultHiveID(ui32) { return MakeDefaultHiveID(); } + /*[[deprecated]]*/ inline ui64 MakeTabletID(ui32, ui32 hiveId, ui64 uniqId) { return MakeTabletID(hiveId != 0, uniqId); } } diff --git a/ydb/core/testlib/basics/appdata.h b/ydb/core/testlib/basics/appdata.h index 24c6cfda7f0..c4a43bb4441 100644 --- a/ydb/core/testlib/basics/appdata.h +++ b/ydb/core/testlib/basics/appdata.h @@ -67,6 +67,7 @@ namespace NKikimr { void AddDomain(TDomainsInfo::TDomain* domain); void AddHive(ui64 hive); + inline void AddHive(ui32, ui64 hive) { AddHive(hive); } void ClearDomainsAndHive(); void SetChannels(TIntrusivePtr channels); void SetBSConf(NKikimrBlobStorage::TNodeWardenServiceSet config); diff --git a/ydb/core/testlib/tablet_helpers.h b/ydb/core/testlib/tablet_helpers.h index bd22bc27daf..a25d9a9376a 100644 --- a/ydb/core/testlib/tablet_helpers.h +++ b/ydb/core/testlib/tablet_helpers.h @@ -39,7 +39,13 @@ namespace NKikimr { const TChannelsBindings DEFAULT_BINDED_CHANNELS = {GetDefaultChannelBind(), GetDefaultChannelBind(), GetDefaultChannelBind()}; void SetupBoxAndStoragePool(TTestActorRuntime &runtime, const TActorId& sender, ui32 nGroups = 1); + inline void SetupBoxAndStoragePool(TTestActorRuntime &runtime, const TActorId& sender, ui32, ui32 nGroups) { + SetupBoxAndStoragePool(runtime, sender, nGroups); + } void SetupChannelProfiles(TAppPrepare &app, ui32 nchannels = 3); + inline void SetupChannelProfiles(TAppPrepare &app, ui32, ui32 nchannels) { + SetupChannelProfiles(app, nchannels); + } TDomainsInfo::TDomain::TStoragePoolKinds DefaultPoolKinds(ui32 count = 1); i64 SetSplitMergePartCountLimit(TTestActorRuntime* runtime, i64 val); -- cgit v1.3