diff options
author | zalyalov <zalyalov@yandex-team.com> | 2023-10-12 15:01:52 +0300 |
---|---|---|
committer | zalyalov <zalyalov@yandex-team.com> | 2023-10-12 16:28:21 +0300 |
commit | 73d404b21a70913028d86e4147b3a022e02df511 (patch) | |
tree | 1d0f1c3a69b71b06044ff4d17e2b80b3215559fe | |
parent | fc3c1bf459caf57a3d7a420fc9154409bab94360 (diff) | |
download | ydb-73d404b21a70913028d86e4147b3a022e02df511.tar.gz |
reenable balancer unit test
-rw-r--r-- | ydb/core/mind/hive/hive_impl_ut.cpp | 5 | ||||
-rw-r--r-- | ydb/core/mind/hive/tablet_info.h | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/ydb/core/mind/hive/hive_impl_ut.cpp b/ydb/core/mind/hive/hive_impl_ut.cpp index da7c49d1db5..6635ec718e0 100644 --- a/ydb/core/mind/hive/hive_impl_ut.cpp +++ b/ydb/core/mind/hive/hive_impl_ut.cpp @@ -104,7 +104,6 @@ Y_UNIT_TEST_SUITE(THiveImplTest) { } Y_UNIT_TEST(BalancerSpeedAndDistribution) { - return; static constexpr ui64 NUM_TABLETS = 1000000; static constexpr ui64 NUM_BUCKETS = 16; @@ -179,9 +178,7 @@ Y_UNIT_TEST_SUITE(THiveImplTest) { for (ui64 i = 0; i < NUM_TABLETS; ++i) { TLeaderTabletInfo& tablet = allTablets.emplace(std::piecewise_construct, std::tuple<TTabletId>(i), std::tuple<TTabletId, THive&>(i, hive)).first->second; - NKikimrTabletBase::TMetrics metrics; - metrics.SetMemory(RandomNumber<double>()); - tablet.UpdateResourceUsage(metrics); + tablet.GetMutableResourceValues().SetMemory(RandomNumber<double>()); } Ctest << "HIVE_TABLET_BALANCE_STRATEGY_HEAVIEST" << Endl; diff --git a/ydb/core/mind/hive/tablet_info.h b/ydb/core/mind/hive/tablet_info.h index 9d8ea8484e3..987d4ef26ce 100644 --- a/ydb/core/mind/hive/tablet_info.h +++ b/ydb/core/mind/hive/tablet_info.h @@ -289,9 +289,10 @@ public: return ResourceMetricsAggregates; } - /*NKikimrTabletBase::TMetrics& GetMutableResourceValues() { + // ONLY for use in unit tests + NKikimrTabletBase::TMetrics& GetMutableResourceValues() { return ResourceValues; - }*/ + } void ActualizeTabletStatistics(TInstant now); ui64 GetRestartsPerPeriod(TInstant barrier); |