Skip to content

Commit 8f7f05b

Browse files
authored
Remove dummy actorsystem config (#14782)
1 parent 8e57514 commit 8f7f05b

File tree

5 files changed

+2
-42
lines changed

5 files changed

+2
-42
lines changed

ydb/core/config/init/dummy.cpp

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,6 @@
22
#include <ydb/core/base/blobstorage_grouptype.h>
33
#include <ydb/core/protos/alloc.pb.h>
44

5-
TAutoPtr<NKikimrConfig::TActorSystemConfig> DummyActorSystemConfig() {
6-
TAutoPtr<NKikimrConfig::TActorSystemConfig> ret(new NKikimrConfig::TActorSystemConfig());
7-
8-
NKikimrConfig::TActorSystemConfig::TScheduler *sched = ret->MutableScheduler();
9-
sched->SetResolution(512);
10-
sched->SetSpinThreshold(0);
11-
sched->SetProgressThreshold(10000);
12-
13-
NKikimrConfig::TActorSystemConfig::TExecutor *exec1 = ret->AddExecutor();
14-
NKikimrConfig::TActorSystemConfig::TExecutor *exec2 = ret->AddExecutor();
15-
NKikimrConfig::TActorSystemConfig::TExecutor *exec3 = ret->AddExecutor();
16-
17-
exec1->SetType(NKikimrConfig::TActorSystemConfig::TExecutor::BASIC);
18-
exec1->SetThreads(1);
19-
exec1->SetSpinThreshold(50);
20-
21-
exec2->SetType(NKikimrConfig::TActorSystemConfig::TExecutor::BASIC);
22-
exec2->SetThreads(2);
23-
exec2->SetSpinThreshold(50);
24-
25-
exec3->SetType(NKikimrConfig::TActorSystemConfig::TExecutor::IO);
26-
exec3->SetThreads(10);
27-
28-
ret->SetSysExecutor(0);
29-
ret->SetUserExecutor(1);
30-
ret->SetBatchExecutor(1);
31-
ret->SetIoExecutor(2);
32-
33-
return ret;
34-
}
355

366
TAutoPtr<NKikimrConfig::TChannelProfileConfig> DummyChannelProfileConfig() {
377
TAutoPtr<NKikimrConfig::TChannelProfileConfig> ret(new NKikimrConfig::TChannelProfileConfig());

ydb/core/config/init/dummy.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22
#include <util/generic/ptr.h>
33
#include <ydb/core/protos/config.pb.h>
44

5-
TAutoPtr<NKikimrConfig::TActorSystemConfig> DummyActorSystemConfig();
65
TAutoPtr<NKikimrConfig::TChannelProfileConfig> DummyChannelProfileConfig();
76
TAutoPtr<NKikimrConfig::TAllocatorConfig> DummyAllocatorConfig();

ydb/core/config/init/init_impl.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444

4545
namespace fs = std::filesystem;
4646

47-
extern TAutoPtr<NKikimrConfig::TActorSystemConfig> DummyActorSystemConfig();
4847
extern TAutoPtr<NKikimrConfig::TAllocatorConfig> DummyAllocatorConfig();
4948

5049
using namespace NYdb::NConsoleClient;
@@ -1112,11 +1111,6 @@ class TInitialConfiguratorImpl
11121111

11131112
Option("sys-file", TCfg::TActorSystemConfigFieldTag{});
11141113

1115-
if (!AppConfig.HasActorSystemConfig()) {
1116-
AppConfig.MutableActorSystemConfig()->CopyFrom(*DummyActorSystemConfig());
1117-
ConfigUpdateTracer.AddUpdate(NKikimrConsole::TConfigItem::ActorSystemConfigItem, TConfigItemInfo::EUpdateKind::SetExplicitly);
1118-
}
1119-
11201114
Option("domains-file", TCfg::TDomainsConfigFieldTag{});
11211115
Option("bs-file", TCfg::TBlobStorageConfigFieldTag{});
11221116
Option("log-file", TCfg::TLogConfigFieldTag{}, &TInitialConfiguratorImpl::SetupLogConfigDefaults);

ydb/core/driver_lib/run/config_parser.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,6 @@ void TRunCommandConfigParser::SetupLastGetOptForConfigFiles(NLastGetopt::TOpts&
8989
void TRunCommandConfigParser::ParseConfigFiles(const NLastGetopt::TOptsParseResult& res) {
9090
if (res.Has("sys-file")) {
9191
Y_ABORT_UNLESS(ParsePBFromFile(res.Get("sys-file"), Config.AppConfig.MutableActorSystemConfig()));
92-
} else {
93-
auto sysConfig = DummyActorSystemConfig();
94-
Config.AppConfig.MutableActorSystemConfig()->CopyFrom(*sysConfig);
9592
}
9693

9794
if (res.Has("naming-file")) {

ydb/core/driver_lib/run/kikimr_services_initializers.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,13 +502,13 @@ static TInterconnectSettings GetInterconnectSettings(const NKikimrConfig::TInter
502502

503503
void TBasicServicesInitializer::InitializeServices(NActors::TActorSystemSetup* setup,
504504
const NKikimr::TAppData* appData) {
505-
auto& systemConfig = Config.GetActorSystemConfig();
506505
bool hasASCfg = Config.HasActorSystemConfig();
507-
if (!hasASCfg || (systemConfig.HasUseAutoConfig() && systemConfig.GetUseAutoConfig())) {
506+
if (!hasASCfg || Config.GetActorSystemConfig().GetUseAutoConfig()) {
508507
NAutoConfigInitializer::ApplyAutoConfig(Config.MutableActorSystemConfig());
509508
}
510509

511510
Y_ABORT_UNLESS(Config.HasActorSystemConfig());
511+
auto& systemConfig = Config.GetActorSystemConfig();
512512
Y_ABORT_UNLESS(systemConfig.HasScheduler());
513513
Y_ABORT_UNLESS(systemConfig.ExecutorSize());
514514
const ui32 systemPoolId = appData->SystemPoolId;

0 commit comments

Comments
 (0)