Skip to content
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
4 changes: 4 additions & 0 deletions ydb/core/protos/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1858,6 +1858,10 @@ message TSchemeShardConfig {

// number of shards per table
optional uint32 MaxCdcInitialScanShardsInFlight = 5 [default = 32];

// number of shards per table
// 0 means default - NKikimrIndexBuilder.TIndexBuildSettings.max_shards_in_flight
optional uint32 MaxRestoreBuildIndexShardsInFlight = 6 [default = 1000];
}

message TCompactionConfig {
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/tablet/resource_broker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1397,7 +1397,7 @@ NKikimrResourceBroker::TResourceBrokerConfig MakeDefaultConfig()
queue = config.AddQueues();
queue->SetName("queue_restore");
queue->SetWeight(100);
queue->MutableLimit()->SetCpu(2);
queue->MutableLimit()->SetCpu(10);

queue = config.AddQueues();
queue->SetName(NLocalDb::KqpResourceManagerQueue);
Expand Down
2 changes: 2 additions & 0 deletions ydb/core/tx/schemeshard/schemeshard_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4650,6 +4650,7 @@ void TSchemeShard::OnActivateExecutor(const TActorContext &ctx) {
ConfigureStatsBatching(appData->SchemeShardConfig, ctx);
ConfigureStatsOperations(appData->SchemeShardConfig, ctx);
MaxCdcInitialScanShardsInFlight = appData->SchemeShardConfig.GetMaxCdcInitialScanShardsInFlight();
MaxRestoreBuildIndexShardsInFlight = appData->SchemeShardConfig.GetMaxRestoreBuildIndexShardsInFlight();

ConfigureBackgroundCleaningQueue(appData->BackgroundCleaningConfig, ctx);
ConfigureDataErasureManager(appData->DataErasureConfig);
Expand Down Expand Up @@ -7223,6 +7224,7 @@ void TSchemeShard::ApplyConsoleConfigs(const NKikimrConfig::TAppConfig& appConfi
ConfigureStatsBatching(schemeShardConfig, ctx);
ConfigureStatsOperations(schemeShardConfig, ctx);
MaxCdcInitialScanShardsInFlight = schemeShardConfig.GetMaxCdcInitialScanShardsInFlight();
MaxRestoreBuildIndexShardsInFlight = schemeShardConfig.GetMaxRestoreBuildIndexShardsInFlight();
}

if (appConfig.HasTableProfilesConfig()) {
Expand Down
1 change: 1 addition & 0 deletions ydb/core/tx/schemeshard/schemeshard_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ class TSchemeShard
TActorId TabletMigrator;

ui32 MaxCdcInitialScanShardsInFlight = 10;
ui32 MaxRestoreBuildIndexShardsInFlight = 0;

TDuration StatsMaxExecuteTime;
TDuration StatsBatchTimeout;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ THolder<TEvIndexBuilder::TEvCreateRequest> BuildIndexPropose(

const TPath dstPath = TPath::Init(item.DstPathId, ss);
settings.set_source_path(dstPath.PathString());
if (ss->MaxRestoreBuildIndexShardsInFlight) {
settings.set_max_shards_in_flight(ss->MaxRestoreBuildIndexShardsInFlight);
}

Y_ABORT_UNLESS(item.NextIndexIdx < item.Scheme.indexes_size());
settings.mutable_index()->CopyFrom(item.Scheme.indexes(item.NextIndexIdx));
Expand Down
Loading