Skip to content

Commit 1e43a9d

Browse files
authored
Fix short config of actor system (#21892)
1 parent 48b4a02 commit 1e43a9d

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

ydb/core/driver_lib/run/auto_config_initializer.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,4 +407,12 @@ namespace NKikimr::NAutoConfigInitializer {
407407
}
408408
}
409409

410-
} // NKikimr::NActorSystemInitializer
410+
} // NKikimr::NActorSystemInitializer
411+
412+
namespace NKikimr {
413+
bool NeedToUseAutoConfig(const NKikimrConfig::TActorSystemConfig& config) {
414+
return config.GetUseAutoConfig()
415+
|| config.HasNodeType()
416+
|| config.HasCpuCount();
417+
}
418+
}

ydb/core/driver_lib/run/auto_config_initializer.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,7 @@ namespace NKikimr::NAutoConfigInitializer {
8585
void ApplyAutoConfig(NKikimrConfig::TGRpcConfig *config, const NKikimrConfig::TActorSystemConfig &asConfig);
8686

8787
} // NKikimr::NActorSystemInitializer
88+
89+
namespace NKikimr {
90+
bool NeedToUseAutoConfig(const NKikimrConfig::TActorSystemConfig& config);
91+
}

ydb/core/driver_lib/run/kikimr_services_initializers.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -504,11 +504,6 @@ static TInterconnectSettings GetInterconnectSettings(const NKikimrConfig::TInter
504504
return result;
505505
}
506506

507-
bool NeedToUseAutoConfig(const NKikimrConfig::TActorSystemConfig& config) {
508-
return config.GetUseAutoConfig()
509-
|| config.HasNodeType()
510-
|| config.HasCpuCount();
511-
}
512507

513508
void TBasicServicesInitializer::InitializeServices(NActors::TActorSystemSetup* setup,
514509
const NKikimr::TAppData* appData) {

ydb/core/driver_lib/run/run.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1131,7 +1131,7 @@ void TKikimrRunner::InitializeAppData(const TKikimrRunConfig& runConfig)
11311131
{
11321132
const auto& cfg = runConfig.AppConfig;
11331133

1134-
bool useAutoConfig = !cfg.HasActorSystemConfig() || (cfg.GetActorSystemConfig().HasUseAutoConfig() && cfg.GetActorSystemConfig().GetUseAutoConfig());
1134+
bool useAutoConfig = !cfg.HasActorSystemConfig() || NeedToUseAutoConfig(cfg.GetActorSystemConfig());
11351135
bool useSharedThreads = cfg.HasActorSystemConfig() && cfg.GetActorSystemConfig().HasUseSharedThreads() && cfg.GetActorSystemConfig().GetUseSharedThreads();
11361136
NAutoConfigInitializer::TASPools pools = NAutoConfigInitializer::GetASPools(cfg.GetActorSystemConfig(), useAutoConfig);
11371137
TMap<TString, ui32> servicePools = NAutoConfigInitializer::GetServicePools(cfg.GetActorSystemConfig(), useAutoConfig);

0 commit comments

Comments
 (0)