summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ydb/core/mind/hive/hive_impl.cpp2
-rw-r--r--ydb/core/mind/hive/hive_impl.h2
-rw-r--r--ydb/core/mind/hive/tx__update_tablet_status.cpp2
-rw-r--r--ydb/core/protos/config.proto4
4 files changed, 5 insertions, 5 deletions
diff --git a/ydb/core/mind/hive/hive_impl.cpp b/ydb/core/mind/hive/hive_impl.cpp
index d02a6bd470f..a8dacbf0bc5 100644
--- a/ydb/core/mind/hive/hive_impl.cpp
+++ b/ydb/core/mind/hive/hive_impl.cpp
@@ -1866,7 +1866,7 @@ bool THive::IsTabletMoveExpedient(const TTabletInfo& tablet, const TNodeInfo& no
void THive::FillTabletInfo(NKikimrHive::TEvResponseHiveInfo& response, ui64 tabletId, const TLeaderTabletInfo *info, const NKikimrHive::TEvRequestHiveInfo &req) {
if (info) {
TInstant now = TActivationContext::Now();
- TInstant restartsBarrierTime = now - GetTabletRestartsPeriod();
+ TInstant restartsBarrierTime = now - GetTabletRestartWatchPeriod();
auto& tabletInfo = *response.AddTablets();
tabletInfo.SetTabletID(tabletId);
tabletInfo.SetTabletType(info->Type);
diff --git a/ydb/core/mind/hive/hive_impl.h b/ydb/core/mind/hive/hive_impl.h
index 1e1d41634fc..d689464f580 100644
--- a/ydb/core/mind/hive/hive_impl.h
+++ b/ydb/core/mind/hive/hive_impl.h
@@ -853,7 +853,7 @@ TTabletInfo* FindTabletEvenInDeleting(TTabletId tabletId, TFollowerId followerId
return CurrentConfig.GetEnableFastTabletMove();
}
- TDuration GetTabletRestartsPeriod() const {
+ TDuration GetTabletRestartsPeriodForPenalties() const {
return TDuration::MilliSeconds(CurrentConfig.GetTabletRestartsPeriod());
}
diff --git a/ydb/core/mind/hive/tx__update_tablet_status.cpp b/ydb/core/mind/hive/tx__update_tablet_status.cpp
index ab3513ef157..ad5a79cfc12 100644
--- a/ydb/core/mind/hive/tx__update_tablet_status.cpp
+++ b/ydb/core/mind/hive/tx__update_tablet_status.cpp
@@ -153,7 +153,7 @@ public:
if (Generation < leader.KnownGeneration) {
return true;
}
- if (leader.GetRestartsPerPeriod(now - Self->GetTabletRestartsPeriod()) >= Self->GetTabletRestartsMaxCount()) {
+ if (leader.GetRestartsPerPeriod(now - Self->GetTabletRestartsPeriodForPenalties()) >= Self->GetTabletRestartsMaxCount()) {
if (IsGoodStatusForPenalties()) {
leader.PostponeStart(now + Self->GetPostponeStartPeriod());
BLOG_D("THive::TTxUpdateTabletStatus::Execute for tablet " << tablet->ToString()
diff --git a/ydb/core/protos/config.proto b/ydb/core/protos/config.proto
index 79ca260fef9..db850708b01 100644
--- a/ydb/core/protos/config.proto
+++ b/ydb/core/protos/config.proto
@@ -1628,14 +1628,14 @@ message THiveConfig {
optional bool ContinueAutoBalancer = 31 [default = true];
optional double MinNodeUsageToBalance = 32 [default = 0.1];
optional double MinPeriodBetweenReassign = 33 [default = 300.0]; // seconds
- optional double TabletRestartWatchPeriod = 34 [default = 3600.0]; // seconds
+ optional double TabletRestartWatchPeriod = 34 [default = 3600.0]; // seconds, period used for statistics, not to be confused with TabletRestartsPeriod
optional double NodeRestartWatchPeriod = 35 [default = 3600.0]; // seconds
optional uint64 NodeDeletePeriod = 36 [default = 3600]; // seconds
repeated THiveTabletLimit DefaultTabletLimit = 37;
repeated THiveTabletPreference DefaultTabletPreference = 38;
optional uint64 SystemTabletCategoryId = 39 [default = 1];
optional bool EnableFastTabletMove = 40 [default = true];
- optional uint64 TabletRestartsPeriod = 42 [default = 1000]; // milliseconds
+ optional uint64 TabletRestartsPeriod = 42 [default = 1000]; // milliseconds, period checked for penalties - not to be confused with TabletRestartWatchPeriod
optional uint64 TabletRestarsMaxCount = 43 [default = 2]; // deprecated, use TabletRestartsMaxCount instead
optional uint64 PostponeStartPeriod = 44 [default = 1000]; // milliseconds
optional EHiveNodeSelectStrategy NodeSelectStrategy = 45 [default = HIVE_NODE_SELECT_STRATEGY_RANDOM_MIN_7P];