File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -764,9 +764,7 @@ namespace NKikimr::NGRpcProxy::V1 {
764764 }
765765
766766 if (settings.has_partitions_count ()) {
767- if (settings.partitions_count () > 0 ) {
768- minParts = settings.partitions_count ();
769- }
767+ minParts = settings.partitions_count ();
770768 } else if (settings.has_autoscaling_settings ()) {
771769 const auto & autoScalteSettings = settings.autoscaling_settings ();
772770 if (autoScalteSettings.min_active_partitions () > 0 ) {
@@ -796,6 +794,10 @@ namespace NKikimr::NGRpcProxy::V1 {
796794 }
797795 }
798796 }
797+ if (minParts <= 0 ) {
798+ error = TStringBuilder () << " Partitions count must be positive, provided " << settings.partitions_count ();
799+ return Ydb::StatusIds::BAD_REQUEST;
800+ }
799801 pqDescr->SetTotalGroupCount (minParts);
800802 pqTabletConfig->SetRequireAuthWrite (true );
801803 pqTabletConfig->SetRequireAuthRead (true );
You can’t perform that action at this time.
0 commit comments