Skip to content

Commit e291788

Browse files
authored
25-1: Boost restore (#15839)
1 parent 0d6580b commit e291788

File tree

5 files changed

+11
-1
lines changed

5 files changed

+11
-1
lines changed

ydb/core/protos/config.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1858,6 +1858,10 @@ message TSchemeShardConfig {
18581858

18591859
// number of shards per table
18601860
optional uint32 MaxCdcInitialScanShardsInFlight = 5 [default = 32];
1861+
1862+
// number of shards per table
1863+
// 0 means default - NKikimrIndexBuilder.TIndexBuildSettings.max_shards_in_flight
1864+
optional uint32 MaxRestoreBuildIndexShardsInFlight = 6 [default = 1000];
18611865
}
18621866

18631867
message TCompactionConfig {

ydb/core/tablet/resource_broker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1397,7 +1397,7 @@ NKikimrResourceBroker::TResourceBrokerConfig MakeDefaultConfig()
13971397
queue = config.AddQueues();
13981398
queue->SetName("queue_restore");
13991399
queue->SetWeight(100);
1400-
queue->MutableLimit()->SetCpu(2);
1400+
queue->MutableLimit()->SetCpu(10);
14011401

14021402
queue = config.AddQueues();
14031403
queue->SetName(NLocalDb::KqpResourceManagerQueue);

ydb/core/tx/schemeshard/schemeshard_impl.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4662,6 +4662,7 @@ void TSchemeShard::OnActivateExecutor(const TActorContext &ctx) {
46624662
ConfigureStatsBatching(appData->SchemeShardConfig, ctx);
46634663
ConfigureStatsOperations(appData->SchemeShardConfig, ctx);
46644664
MaxCdcInitialScanShardsInFlight = appData->SchemeShardConfig.GetMaxCdcInitialScanShardsInFlight();
4665+
MaxRestoreBuildIndexShardsInFlight = appData->SchemeShardConfig.GetMaxRestoreBuildIndexShardsInFlight();
46654666

46664667
ConfigureBackgroundCleaningQueue(appData->BackgroundCleaningConfig, ctx);
46674668
ConfigureDataErasureManager(appData->DataErasureConfig);
@@ -7235,6 +7236,7 @@ void TSchemeShard::ApplyConsoleConfigs(const NKikimrConfig::TAppConfig& appConfi
72357236
ConfigureStatsBatching(schemeShardConfig, ctx);
72367237
ConfigureStatsOperations(schemeShardConfig, ctx);
72377238
MaxCdcInitialScanShardsInFlight = schemeShardConfig.GetMaxCdcInitialScanShardsInFlight();
7239+
MaxRestoreBuildIndexShardsInFlight = schemeShardConfig.GetMaxRestoreBuildIndexShardsInFlight();
72387240
}
72397241

72407242
if (appConfig.HasTableProfilesConfig()) {

ydb/core/tx/schemeshard/schemeshard_impl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ class TSchemeShard
359359
TActorId TabletMigrator;
360360

361361
ui32 MaxCdcInitialScanShardsInFlight = 10;
362+
ui32 MaxRestoreBuildIndexShardsInFlight = 0;
362363

363364
TDuration StatsMaxExecuteTime;
364365
TDuration StatsBatchTimeout;

ydb/core/tx/schemeshard/schemeshard_import_flow_proposals.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,9 @@ THolder<TEvIndexBuilder::TEvCreateRequest> BuildIndexPropose(
207207

208208
const TPath dstPath = TPath::Init(item.DstPathId, ss);
209209
settings.set_source_path(dstPath.PathString());
210+
if (ss->MaxRestoreBuildIndexShardsInFlight) {
211+
settings.set_max_shards_in_flight(ss->MaxRestoreBuildIndexShardsInFlight);
212+
}
210213

211214
Y_ABORT_UNLESS(item.NextIndexIdx < item.Scheme.indexes_size());
212215
settings.mutable_index()->CopyFrom(item.Scheme.indexes(item.NextIndexIdx));

0 commit comments

Comments
 (0)