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


##########
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:
   > It is already `Instead of calling delete-partitioned-topic please call 
delete.`
   
   This is your code, I didn't change this.
   
   `delete-partitioned-topic` is a pulsar-admin's command, this prompt is not 
accurate enough, and only applies to pulsar-admin's command, not to other 
clients.



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