@@ -471,14 +471,7 @@ namespace NKikimr::NDataStreams::V1 {
471
471
Y_UNUSED (selfInfo);
472
472
473
473
TString error;
474
- if (!GetProtoRequest ()->has_partitioning_settings ()) {
475
- if (!ValidateShardsCount (*GetProtoRequest (), pqGroupDescription, error))
476
- {
477
- return ReplyWithError (Ydb::StatusIds::BAD_REQUEST, static_cast <size_t >(NYds::EErrorCodes::BAD_REQUEST), error);
478
- }
479
474
480
- groupConfig.SetTotalGroupCount (GetProtoRequest ()->target_shard_count ());
481
- }
482
475
switch (GetProtoRequest ()->retention_case ()) {
483
476
case Ydb::DataStreams::V1::UpdateStreamRequest::RetentionCase::kRetentionPeriodHours :
484
477
groupConfig.MutablePQTabletConfig ()->MutablePartitionConfig ()->SetLifetimeSeconds (
@@ -520,7 +513,17 @@ namespace NKikimr::NDataStreams::V1 {
520
513
}
521
514
}
522
515
523
- if (GetProtoRequest ()->has_partitioning_settings ()) {
516
+ if (!GetProtoRequest ()->has_partitioning_settings () ||
517
+ (GetProtoRequest ()->partitioning_settings ().has_auto_partitioning_settings () &&
518
+ GetProtoRequest ()->partitioning_settings ().auto_partitioning_settings ().strategy () ==
519
+ Ydb::DataStreams::V1::AutoPartitioningStrategy::AUTO_PARTITIONING_STRATEGY_DISABLED)) {
520
+ if (!ValidateShardsCount (*GetProtoRequest (), pqGroupDescription, error))
521
+ {
522
+ return ReplyWithError (Ydb::StatusIds::BAD_REQUEST, static_cast <size_t >(NYds::EErrorCodes::BAD_REQUEST), error);
523
+ }
524
+
525
+ groupConfig.SetTotalGroupCount (GetProtoRequest ()->target_shard_count ());
526
+ } else {
524
527
auto r = ValidatePartitioningSettings (GetProtoRequest ()->partitioning_settings ());
525
528
if (!r.empty ()) {
526
529
return ReplyWithError (Ydb::StatusIds::BAD_REQUEST, static_cast <size_t >(NYds::EErrorCodes::INVALID_ARGUMENT), r);
0 commit comments