poorbarcode commented on code in PR #24225:
URL: https://github.com/apache/pulsar/pull/24225#discussion_r2087014471


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java:
##########
@@ -596,12 +598,32 @@ protected void 
internalCreatePartitionedTopic(AsyncResponse asyncResponse, int n
                     }
                 })
                 .thenCompose(__ -> checkTopicExistsAsync(topicName))
-                .thenAccept(exists -> {
-                    if (exists) {
-                        log.warn("[{}] Failed to create already existing topic 
{}", clientAppId(), topicName);
-                        throw new RestException(Status.CONFLICT, "This topic 
already exists");
+                .thenAccept(topicExistsInfo -> {
+                    try {
+                        if (topicExistsInfo.isExists()) {
+                            if 
(topicExistsInfo.getTopicType().equals(TopicType.NON_PARTITIONED)
+                                    || 
(topicExistsInfo.getTopicType().equals(TopicType.PARTITIONED)
+                                    && !createLocalTopicOnly)) {

Review Comment:
   I reviewed the original purpose that added the param `createLocalTopicOnly`
   - 
https://github.com/apache/pulsar/pull/10963/files#diff-6902810fd24ff29ec34052bcc6a0de36d76107649148d945b80ec2be888e9042R760-R768
   
   It has two meanings
   - The first one is the same as you explained here 
https://github.com/apache/pulsar/pull/24225/#discussion_r2086270383
   - The second one: continuously creates partitions that pathed 
`/managed-ledgers` even if the partitioned topic metadata exists.
   
   Regarding to the second meaning, you changed nothing



-- 
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: commits-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to