Skip to content

Commit 73e0fe8

Browse files
committed
Move MaxTxInFly to separate config
1 parent 626410b commit 73e0fe8

File tree

8 files changed

+20
-5
lines changed

8 files changed

+20
-5
lines changed

ydb/core/base/appdata.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ struct TAppData::TImpl {
8181
NKikimrConfig::TStatisticsConfig StatisticsConfig;
8282
TMetricsConfig MetricsConfig;
8383
NKikimrConfig::TSystemTabletBackupConfig SystemTabletBackupConfig;
84+
NKikimrConfig::TSystemTabletConfig SystemTabletConfig;
8485
};
8586

8687
TAppData::TAppData(
@@ -147,6 +148,7 @@ TAppData::TAppData(
147148
, StatisticsConfig(Impl->StatisticsConfig)
148149
, MetricsConfig(Impl->MetricsConfig)
149150
, SystemTabletBackupConfig(Impl->SystemTabletBackupConfig)
151+
, SystemTabletConfig(Impl->SystemTabletConfig)
150152
, KikimrShouldContinue(kikimrShouldContinue)
151153
, TracingConfigurator(MakeIntrusive<NJaegerTracing::TSamplingThrottlingConfigurator>(TimeProvider, RandomProvider))
152154
{}

ydb/core/base/appdata_fwd.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ namespace NKikimrConfig {
8181
class TBridgeConfig;
8282
class TStatisticsConfig;
8383
class TSystemTabletBackupConfig;
84+
class TSystemTabletConfig;
8485
}
8586

8687
namespace NKikimrReplication {
@@ -270,6 +271,7 @@ struct TAppData {
270271
NKikimrConfig::TStatisticsConfig& StatisticsConfig;
271272
TMetricsConfig& MetricsConfig;
272273
NKikimrConfig::TSystemTabletBackupConfig& SystemTabletBackupConfig;
274+
NKikimrConfig::TSystemTabletConfig& SystemTabletConfig;
273275
bool EnforceUserTokenRequirement = false;
274276
bool EnforceUserTokenCheckRequirement = false; // check token if it was specified
275277
bool AllowHugeKeyValueDeletes = true; // delete when all clients limit deletes per request

ydb/core/driver_lib/run/run.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,6 +1461,10 @@ void TKikimrRunner::InitializeAppData(const TKikimrRunConfig& runConfig)
14611461
AppData->SystemTabletBackupConfig = runConfig.AppConfig.GetSystemTabletBackupConfig();
14621462
}
14631463

1464+
if (runConfig.AppConfig.HasSystemTabletConfig()) {
1465+
AppData->SystemTabletConfig = runConfig.AppConfig.GetSystemTabletConfig();
1466+
}
1467+
14641468
// setup resource profiles
14651469
AppData->ResourceProfiles = new TResourceProfiles;
14661470
if (runConfig.AppConfig.GetBootstrapConfig().ResourceProfilesSize())

ydb/core/protos/config.proto

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2741,6 +2741,10 @@ message TSystemTabletBackupConfig {
27412741
}
27422742
}
27432743

2744+
message TSystemTabletConfig {
2745+
optional uint64 MaxTxInFly = 1 [default = 10000];
2746+
}
2747+
27442748
message TAppConfig {
27452749
option (NMarkers.Root) = true;
27462750
optional TActorSystemConfig ActorSystemConfig = 1;
@@ -2848,6 +2852,7 @@ message TAppConfig {
28482852
optional TStatisticsConfig StatisticsConfig = 113;
28492853
optional TMetricsConfig MetricsConfig = 114;
28502854
optional TSystemTabletBackupConfig SystemTabletBackupConfig = 115;
2855+
optional TSystemTabletConfig SystemTabletConfig = 116;
28512856
}
28522857

28532858
message TYdbVersion {

ydb/core/protos/memory_controller_config.proto

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,4 @@ message TMemoryControllerConfig {
2828

2929
optional float CompactionLimitPercent = 130 [default = 10];
3030
optional uint64 CompactionLimitBytes = 131;
31-
32-
optional uint64 MaxTxInFly = 132 [default = 10000];
3331
}

ydb/core/tablet_flat/flat_executor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ TExecutor::TExecutor(
133133
, Time(TAppData::TimeProvider)
134134
, Owner(owner)
135135
, OwnerActorId(ownerActorId)
136-
, MaxTxInFly(AppData()->MemoryControllerConfig.GetMaxTxInFly())
136+
, MaxTxInFly(AppData()->SystemTabletConfig.GetMaxTxInFly())
137137
, Emitter(new TIdEmitter)
138138
, CounterEventsInFlight(new TEvTabletCounters::TInFlightCookie)
139139
, Stats(new TExecutorStatsImpl())

ydb/tests/library/harness/kikimr_config.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ def __init__(
186186
verbose_memory_limit_exception=False,
187187
enable_static_auth=False,
188188
cms_config=None,
189-
explicit_statestorage_config=None
189+
explicit_statestorage_config=None,
190+
system_tablet_config=None,
190191
):
191192
if extra_feature_flags is None:
192193
extra_feature_flags = []
@@ -470,6 +471,9 @@ def __init__(
470471
if memory_controller_config:
471472
self.yaml_config["memory_controller_config"] = memory_controller_config
472473

474+
if system_tablet_config:
475+
self.yaml_config["system_tablet_config"] = system_tablet_config
476+
473477
if os.getenv("YDB_HARD_MEMORY_LIMIT_BYTES"):
474478
if "memory_controller_config" not in self.yaml_config:
475479
self.yaml_config["memory_controller_config"] = {}

ydb/tests/olap/test_overloads.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def _setup_ydb_rp(cls):
110110
logger.info(yatest.common.execute([ydb_path, "-V"], wait=True).stdout.decode("utf-8"))
111111
config = KikimrConfigGenerator(
112112
extra_feature_flags={"enable_olap_reject_probability": True},
113-
memory_controller_config={"max_tx_in_fly": 0},
113+
system_tablet_config={"max_tx_in_fly": 0},
114114
)
115115
cls.cluster = KiKiMR(config)
116116
cls.cluster.start()

0 commit comments

Comments
 (0)