Skip to content

Commit 498d3d1

Browse files
authored
Merge e83b85c into 65caa64
2 parents 65caa64 + e83b85c commit 498d3d1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ydb/services/lib/actors/pq_schema_actor.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -685,8 +685,12 @@ namespace NKikimr::NGRpcProxy::V1 {
685685
}
686686

687687
std::optional<TYdbPqCodes> ValidatePartitionStrategy(const ::NKikimrPQ::TPQTabletConfig& config, TString& error) {
688-
if (!config.has_partitionstrategy())
688+
if (!config.HasPartitionStrategy()) {
689689
return std::nullopt;
690+
}
691+
if (::NKikimrPQ::TPQTabletConfig_TPartitionStrategyType::TPQTabletConfig_TPartitionStrategyType_DISABLED == config.GetPartitionStrategy().GetPartitionStrategyType()) {
692+
return std::nullopt;
693+
}
690694
auto strategy = config.GetPartitionStrategy();
691695
if (strategy.GetMinPartitionCount() < 0) {
692696
error = TStringBuilder() << "Partitions count must be non-negative, provided " << strategy.GetMinPartitionCount();
@@ -713,7 +717,7 @@ namespace NKikimr::NGRpcProxy::V1 {
713717
error = TStringBuilder() << "Partition scale threshold time must be greater then 1 second, provided " << strategy.GetScaleThresholdSeconds() << " seconds";
714718
return TYdbPqCodes(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::VALIDATION_ERROR);
715719
}
716-
if (strategy.GetPartitionStrategyType() != ::NKikimrPQ::TPQTabletConfig_TPartitionStrategyType::TPQTabletConfig_TPartitionStrategyType_DISABLED && config.GetPartitionConfig().HasStorageLimitBytes()) {
720+
if (config.GetPartitionConfig().HasStorageLimitBytes()) {
717721
error = TStringBuilder() << "Auto partitioning is incompatible with retention storage bytes option";
718722
return TYdbPqCodes(Ydb::StatusIds::BAD_REQUEST, Ydb::PersQueue::ErrorCode::VALIDATION_ERROR);
719723
}

0 commit comments

Comments
 (0)