File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
ydb/public/lib/ydb_cli/commands Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -304,8 +304,7 @@ namespace {
304304
305305 config.Opts ->AddLongOption (" auto-partitioning-max-partitions-count" , " Maximum number of partitions for topic" )
306306 .Optional ()
307- .StoreResult (&MaxActivePartitions_)
308- .DefaultValue (1 );
307+ .StoreResult (&MaxActivePartitions_);
309308 AddAutoPartitioning (config, false );
310309 }
311310
@@ -329,7 +328,11 @@ namespace {
329328 GetAutoPartitioningUpUtilizationPercent () ? *GetAutoPartitioningUpUtilizationPercent () : 0 ,
330329 GetAutoPartitioninDownUtilizationPercent () ? *GetAutoPartitioninDownUtilizationPercent () : 0 );
331330
332- settings.PartitioningSettings (MinActivePartitions_, MaxActivePartitions_, autoscaleSettings);
331+ ui32 finalMaxActivePartitions = MaxActivePartitions_.Defined () ? *MaxActivePartitions_
332+ : autoscaleSettings.GetStrategy () != NTopic::EAutoPartitioningStrategy::Disabled ? MinActivePartitions_ + 50
333+ : MinActivePartitions_;
334+
335+ settings.PartitioningSettings (MinActivePartitions_, finalMaxActivePartitions, autoscaleSettings);
333336 settings.PartitionWriteBurstBytes (PartitionWriteSpeedKbps_ * 1_KB);
334337 settings.PartitionWriteSpeedBytesPerSecond (PartitionWriteSpeedKbps_ * 1_KB);
335338
Original file line number Diff line number Diff line change @@ -71,8 +71,7 @@ namespace NYdb::NConsoleClient {
7171 ui64 RetentionPeriodHours_;
7272 ui64 RetentionStorageMb_;
7373 ui32 MinActivePartitions_;
74- ui32 MaxActivePartitions_;
75-
74+ TMaybe<ui32> MaxActivePartitions_;
7675 ui32 PartitionWriteSpeedKbps_;
7776 };
7877
You can’t perform that action at this time.
0 commit comments