nodece commented on code in PR #23002:
URL: https://github.com/apache/pulsar/pull/23002#discussion_r1666959049


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java:
##########
@@ -742,7 +742,17 @@ protected void 
internalDeletePartitionedTopic(AsyncResponse asyncResponse,
                         .thenCompose(partitionedMeta -> {
                             final int numPartitions = 
partitionedMeta.partitions;
                             if (numPartitions < 1) {
-                                return CompletableFuture.completedFuture(null);
+                                return 
pulsar().getNamespaceService().checkNonPartitionedTopicExists(topicName)
+                                        .thenApply(exists -> {
+                                    if (exists) {
+                                        throw new 
RestException(Response.Status.CONFLICT,
+                                                String.format("%s is a 
non-partitioned topic. Instead of calling"

Review Comment:
   Does `Instead of calling delete-partitioned-topic please call delete.` make 
sense?



-- 
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]

Reply via email to