Skip to content

Remove dummy actorsystem config #14782

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions ydb/core/config/init/dummy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,6 @@
#include <ydb/core/base/blobstorage_grouptype.h>
#include <ydb/core/protos/alloc.pb.h>

TAutoPtr<NKikimrConfig::TActorSystemConfig> DummyActorSystemConfig() {
TAutoPtr<NKikimrConfig::TActorSystemConfig> ret(new NKikimrConfig::TActorSystemConfig());

NKikimrConfig::TActorSystemConfig::TScheduler *sched = ret->MutableScheduler();
sched->SetResolution(512);
sched->SetSpinThreshold(0);
sched->SetProgressThreshold(10000);

NKikimrConfig::TActorSystemConfig::TExecutor *exec1 = ret->AddExecutor();
NKikimrConfig::TActorSystemConfig::TExecutor *exec2 = ret->AddExecutor();
NKikimrConfig::TActorSystemConfig::TExecutor *exec3 = ret->AddExecutor();

exec1->SetType(NKikimrConfig::TActorSystemConfig::TExecutor::BASIC);
exec1->SetThreads(1);
exec1->SetSpinThreshold(50);

exec2->SetType(NKikimrConfig::TActorSystemConfig::TExecutor::BASIC);
exec2->SetThreads(2);
exec2->SetSpinThreshold(50);

exec3->SetType(NKikimrConfig::TActorSystemConfig::TExecutor::IO);
exec3->SetThreads(10);

ret->SetSysExecutor(0);
ret->SetUserExecutor(1);
ret->SetBatchExecutor(1);
ret->SetIoExecutor(2);

return ret;
}

TAutoPtr<NKikimrConfig::TChannelProfileConfig> DummyChannelProfileConfig() {
TAutoPtr<NKikimrConfig::TChannelProfileConfig> ret(new NKikimrConfig::TChannelProfileConfig());
Expand Down
1 change: 0 additions & 1 deletion ydb/core/config/init/dummy.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
#include <util/generic/ptr.h>
#include <ydb/core/protos/config.pb.h>

TAutoPtr<NKikimrConfig::TActorSystemConfig> DummyActorSystemConfig();
TAutoPtr<NKikimrConfig::TChannelProfileConfig> DummyChannelProfileConfig();
TAutoPtr<NKikimrConfig::TAllocatorConfig> DummyAllocatorConfig();
6 changes: 0 additions & 6 deletions ydb/core/config/init/init_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@

namespace fs = std::filesystem;

extern TAutoPtr<NKikimrConfig::TActorSystemConfig> DummyActorSystemConfig();
extern TAutoPtr<NKikimrConfig::TAllocatorConfig> DummyAllocatorConfig();

using namespace NYdb::NConsoleClient;
Expand Down Expand Up @@ -1104,11 +1103,6 @@ class TInitialConfiguratorImpl

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

if (!AppConfig.HasActorSystemConfig()) {
AppConfig.MutableActorSystemConfig()->CopyFrom(*DummyActorSystemConfig());
ConfigUpdateTracer.AddUpdate(NKikimrConsole::TConfigItem::ActorSystemConfigItem, TConfigItemInfo::EUpdateKind::SetExplicitly);
}

Option("domains-file", TCfg::TDomainsConfigFieldTag{});
Option("bs-file", TCfg::TBlobStorageConfigFieldTag{});
Option("log-file", TCfg::TLogConfigFieldTag{}, &TInitialConfiguratorImpl::SetupLogConfigDefaults);
Expand Down
3 changes: 0 additions & 3 deletions ydb/core/driver_lib/run/config_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@ void TRunCommandConfigParser::SetupLastGetOptForConfigFiles(NLastGetopt::TOpts&
void TRunCommandConfigParser::ParseConfigFiles(const NLastGetopt::TOptsParseResult& res) {
if (res.Has("sys-file")) {
Y_ABORT_UNLESS(ParsePBFromFile(res.Get("sys-file"), Config.AppConfig.MutableActorSystemConfig()));
} else {
auto sysConfig = DummyActorSystemConfig();
Config.AppConfig.MutableActorSystemConfig()->CopyFrom(*sysConfig);
}

if (res.Has("naming-file")) {
Expand Down
4 changes: 2 additions & 2 deletions ydb/core/driver_lib/run/kikimr_services_initializers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -502,13 +502,13 @@ static TInterconnectSettings GetInterconnectSettings(const NKikimrConfig::TInter

void TBasicServicesInitializer::InitializeServices(NActors::TActorSystemSetup* setup,
const NKikimr::TAppData* appData) {
auto& systemConfig = Config.GetActorSystemConfig();
bool hasASCfg = Config.HasActorSystemConfig();
if (!hasASCfg || (systemConfig.HasUseAutoConfig() && systemConfig.GetUseAutoConfig())) {
if (!hasASCfg || Config.GetActorSystemConfig().GetUseAutoConfig()) {
NAutoConfigInitializer::ApplyAutoConfig(Config.MutableActorSystemConfig());
}

Y_ABORT_UNLESS(Config.HasActorSystemConfig());
auto& systemConfig = Config.GetActorSystemConfig();
Y_ABORT_UNLESS(systemConfig.HasScheduler());
Y_ABORT_UNLESS(systemConfig.ExecutorSize());
const ui32 systemPoolId = appData->SystemPoolId;
Expand Down
Loading