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 {
304
304
305
305
config.Opts ->AddLongOption (" auto-partitioning-max-partitions-count" , " Maximum number of partitions for topic" )
306
306
.Optional ()
307
- .StoreResult (&MaxActivePartitions_)
308
- .DefaultValue (1 );
307
+ .StoreResult (&MaxActivePartitions_);
309
308
AddAutoPartitioning (config, false );
310
309
}
311
310
@@ -329,7 +328,11 @@ namespace {
329
328
GetAutoPartitioningUpUtilizationPercent () ? *GetAutoPartitioningUpUtilizationPercent () : 0 ,
330
329
GetAutoPartitioninDownUtilizationPercent () ? *GetAutoPartitioninDownUtilizationPercent () : 0 );
331
330
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);
333
336
settings.PartitionWriteBurstBytes (PartitionWriteSpeedKbps_ * 1_KB);
334
337
settings.PartitionWriteSpeedBytesPerSecond (PartitionWriteSpeedKbps_ * 1_KB);
335
338
Original file line number Diff line number Diff line change @@ -71,8 +71,7 @@ namespace NYdb::NConsoleClient {
71
71
ui64 RetentionPeriodHours_;
72
72
ui64 RetentionStorageMb_;
73
73
ui32 MinActivePartitions_;
74
- ui32 MaxActivePartitions_;
75
-
74
+ TMaybe<ui32> MaxActivePartitions_;
76
75
ui32 PartitionWriteSpeedKbps_;
77
76
};
78
77
You can’t perform that action at this time.
0 commit comments