mattisonchao commented on code in PR #15653:
URL: https://github.com/apache/pulsar/pull/15653#discussion_r876729286
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java:
##########
@@ -834,9 +835,11 @@ protected void internalSetAutoTopicCreation(AsyncResponse
asyncResponse,
"Invalid configuration for autoTopicCreationOverride.
the detail is "
+ validateResult.getErrorInfo());
}
- if (maxPartitions > 0 &&
autoTopicCreationOverride.getDefaultNumPartitions() > maxPartitions) {
- throw new RestException(Status.NOT_ACCEPTABLE,
- "Number of partitions should be less than or equal to
" + maxPartitions);
+ if (Objects.equals(autoTopicCreationOverride.getTopicType(),
TopicType.PARTITIONED.toString())) {
+ if (maxPartitions > 0 &&
autoTopicCreationOverride.getDefaultNumPartitions() > maxPartitions) {
Review Comment:
The null check already exists in bellow code:
https://github.com/mattisonchao/pulsar/blob/dec9c6bdc584bfbabe2120a681f090bfb622d030/pulsar-client-admin-api/src/main/java/org/apache/pulsar/common/policies/data/impl/AutoTopicCreationOverrideImpl.java#L39-L61
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]