Skip to content

Commit 75314ca

Browse files
authored
Merge cbdb793 into 84442b6
2 parents 84442b6 + cbdb793 commit 75314ca

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ydb/services/lib/actors/pq_schema_actor.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff 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);

0 commit comments

Comments
 (0)