BewareMyPower commented on a change in pull request #9342: URL: https://github.com/apache/pulsar/pull/9342#discussion_r565262576
########## File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java ########## @@ -460,6 +460,16 @@ protected void internalCreateNonPartitionedTopic(boolean authoritative) { if (partitionMetadata.partitions > 0) { log.warn("[{}] Partitioned topic with the same name already exists {}", clientAppId(), topicName); throw new RestException(Status.CONFLICT, "This topic already exists"); + } else { + if (topicName.isPartitioned()) { + final TopicName partitionedTopicName = TopicName.get(topicName.getPartitionedTopicName()); + partitionMetadata = fetchPartitionedTopicMetadata(pulsar(), partitionedTopicName); Review comment: Sounds good. I'll use the suggested way to fix. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org