diff options
| author | Alexander Rutkovsky <[email protected]> | 2024-03-05 17:52:00 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-03-05 17:52:00 +0300 |
| commit | 09890828eb132fa4567f7d2ecf46ec7d2c8994e6 (patch) | |
| tree | 637951ee07c9a11587ca966a6279d4ad2e1b1aa2 | |
| parent | 0902f9bf8bb8c0178d7cceadbfefb5e753f1d45e (diff) | |
Fix sync (#2461)
| -rw-r--r-- | ydb/core/base/domain.h | 23 | ||||
| -rw-r--r-- | ydb/core/base/tabletid.h | 4 | ||||
| -rw-r--r-- | ydb/core/testlib/basics/appdata.h | 1 | ||||
| -rw-r--r-- | ydb/core/testlib/tablet_helpers.h | 6 |
4 files changed, 34 insertions, 0 deletions
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 <typename... TOtherArgs> + /*[[deprecated]]*/ static TDomain::TPtr ConstructDomainWithExplicitTabletIds(const TString &name, ui32 domainUid, + ui64 schemeRoot, ui32, ui32, TVector<ui32>, ui32, TVector<ui32>, TOtherArgs&&... args) { + return ConstructDomainWithExplicitTabletIds(name, domainUid, schemeRoot, std::forward<TOtherArgs>(args)...); + } }; TIntrusivePtr<TDomain> 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<ui32, TDomain::TPtr> 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<TChannelProfiles> 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); |
