aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzalyalov <zalyalov@yandex-team.com>2023-10-06 11:00:37 +0300
committerzalyalov <zalyalov@yandex-team.com>2023-10-06 11:24:00 +0300
commit08e5ceb0120d558f6c87d40b70b849f439086850 (patch)
tree5cbcdb2910321f11b822e605ac2265662d1a5cc4
parente6552744f49f722981ec4ba533d430744410c1f1 (diff)
downloadydb-08e5ceb0120d558f6c87d40b70b849f439086850.tar.gz
fix SpreadNeghbours test
-rw-r--r--ydb/core/mind/hive/hive_ut.cpp3
-rw-r--r--ydb/core/mind/hive/tablet_info.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/ydb/core/mind/hive/hive_ut.cpp b/ydb/core/mind/hive/hive_ut.cpp
index 445a16aa87..f8bce78fef 100644
--- a/ydb/core/mind/hive/hive_ut.cpp
+++ b/ydb/core/mind/hive/hive_ut.cpp
@@ -4191,7 +4191,8 @@ Y_UNIT_TEST_SUITE(THiveTest) {
MakeSureTabletIsUp(runtime, tabletId, 0);
}
- // report empty metrics to turn neighbour-balancing on
+ // make metrics empty to turn neighbour-balancing on
+ runtime.AdvanceCurrentTime(TDuration::Hours(24));
for (auto tablet : tablets) {
THolder<TEvHive::TEvTabletMetrics> metrics = MakeHolder<TEvHive::TEvTabletMetrics>();
NKikimrHive::TTabletMetrics* metric = metrics->Record.AddTabletMetrics();
diff --git a/ydb/core/mind/hive/tablet_info.cpp b/ydb/core/mind/hive/tablet_info.cpp
index a852abc1d9..ed50bd8d05 100644
--- a/ydb/core/mind/hive/tablet_info.cpp
+++ b/ydb/core/mind/hive/tablet_info.cpp
@@ -314,7 +314,7 @@ const TVector<i64>& TTabletInfo::GetTabletAllowedMetricIds() const {
}
void TTabletInfo::UpdateResourceUsage(const NKikimrTabletBase::TMetrics& metrics) {
- TInstant now = TInstant::Now();
+ TInstant now = TActivationContext::Now();
const TVector<i64>& allowedMetricIds(GetTabletAllowedMetricIds());
auto before = ResourceValues;
auto maximum = GetResourceMaximumValues();