Skip to content

Commit 682e700

Browse files
authored
disable warmup for root hive (#954)
1 parent a86783e commit 682e700

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

ydb/core/mind/hive/hive_ut.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -4163,7 +4163,9 @@ Y_UNIT_TEST_SUITE(THiveTest) {
41634163
static const int NUM_TABLETS = NUM_NODES * TABLETS_PER_NODE;
41644164

41654165
TTestBasicRuntime runtime(NUM_NODES, false);
4166-
Setup(runtime, true);
4166+
Setup(runtime, true, 1, [](TAppPrepare& app) {
4167+
app.HiveConfig.SetWarmUpEnabled(true);
4168+
});
41674169
const int nodeBase = runtime.GetNodeId(0);
41684170
TActorId senderA = runtime.AllocateEdgeActor();
41694171
const ui64 hiveTablet = MakeDefaultHiveID(0);

ydb/core/mind/hive/tx__load_everything.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,11 @@ class TTxLoadEverything : public TTransactionBase<THive> {
181181
}
182182

183183
Self->BuildCurrentConfig();
184-
Self->WarmUp = Self->CurrentConfig.GetWarmUpEnabled();
184+
if (Self->CurrentConfig.HasWarmUpEnabled()) {
185+
Self->WarmUp = Self->CurrentConfig.GetWarmUpEnabled();
186+
} else {
187+
Self->WarmUp = Self->CurrentConfig.GetWarmUpEnabled() && !Self->AreWeRootHive();
188+
}
185189

186190
Self->DefaultResourceMetricsAggregates.MaximumCPU.SetWindowSize(TDuration::MilliSeconds(Self->GetMetricsWindowSize()));
187191
Self->DefaultResourceMetricsAggregates.MaximumMemory.SetWindowSize(TDuration::MilliSeconds(Self->GetMetricsWindowSize()));

0 commit comments

Comments
 (0)