Skip to content

Commit

Permalink
add config
Browse files Browse the repository at this point in the history
  • Loading branch information
vporyadke committed Feb 16, 2025
1 parent 14d1285 commit 42f71d3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ydb/core/mind/hive/hive_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,10 @@ TTabletInfo* FindTabletEvenInDeleting(TTabletId tabletId, TFollowerId followerId
return CurrentConfig.GetMaxPingsInFlight();
}

ui64 GetNodeRestartsForPenalty() const {
return CurrentConfig.GetNodeRestartsForPenalty();
}

static void ActualizeRestartStatistics(google::protobuf::RepeatedField<google::protobuf::uint64>& restartTimestamps, ui64 barrier);
static ui64 GetRestartsPerPeriod(const google::protobuf::RepeatedField<google::protobuf::uint64>& restartTimestamps, ui64 barrier);
static bool IsSystemTablet(TTabletTypes::EType type);
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/mind/hive/node_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ i32 TNodeInfo::GetPriorityForTablet(const TTabletInfo& tablet, TDataCenterPriori
}

priority += dcPriority[GetDataCenter()];
priority -= GetRestartsPerPeriod() / 3;
priority -= GetRestartsPerPeriod() / Hive.GetNodeRestartsForPenalty();

return priority;
}
Expand Down
1 change: 1 addition & 0 deletions ydb/core/protos/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1767,6 +1767,7 @@ message THiveConfig {
optional uint64 ScaleInWindowSize = 82 [default = 5]; // buckets
optional double TargetTrackingCPUMargin = 83 [default = 0.1]; // percent
optional double DryRunTargetTrackingCPU = 84; // percent
optional uint64 NodeRestartsForPenalty = 85 [default = 3];
}

message TBlobCacheConfig {
Expand Down

0 comments on commit 42f71d3

Please sign in to comment.