codelipenghui commented on a change in pull request #14608:
URL: https://github.com/apache/pulsar/pull/14608#discussion_r830836067



##########
File path: 
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTopics.java
##########
@@ -653,14 +659,14 @@ void run() throws Exception {
                 "--force" }, description = "Close all 
producer/consumer/replicator and delete topic forcefully")
         private boolean force = false;
 
-        @Parameter(names = { "-d",
-                "--deleteSchema" }, description = "Delete schema while 
deleting topic")
+        @Parameter(names = {"-d", "--deleteSchema"}, description = "Delete 
schema while deleting topic, "
+                + "but the parameter is invalid and the schema is always 
deleted", hidden = true)
         private boolean deleteSchema = false;

Review comment:
       Should also update the default value to true?

##########
File path: 
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTopics.java
##########
@@ -632,19 +635,22 @@ void run() throws Exception {
                 "--force" }, description = "Close all 
producer/consumer/replicator and delete topic forcefully")
         private boolean force = false;
 
-        @Parameter(names = { "-d",
-                "--deleteSchema" }, description = "Delete schema while 
deleting topic")
+        @Parameter(names = {"-d", "--deleteSchema"}, description = "Delete 
schema while deleting topic, "
+                + "but the parameter is invalid and the schema is always 
deleted", hidden = true)
         private boolean deleteSchema = false;

Review comment:
       Should also update the default value to true?

##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
##########
@@ -581,14 +582,6 @@ protected void 
internalDeletePartitionedTopic(AsyncResponse asyncResponse, boole
                             if (numPartitions < 1){
                                 return CompletableFuture.completedFuture(null);
                             }
-                            if (deleteSchema) {
-                                return pulsar().getBrokerService()
-                                        
.deleteSchemaStorage(topicName.getPartition(0).toString())
-                                        .thenCompose(unused ->
-                                                
internalRemovePartitionsAuthenticationPoliciesAsync(numPartitions))
-                                        .thenCompose(unused2 ->
-                                                
internalRemovePartitionsTopicAsync(numPartitions, force));
-                            }

Review comment:
       If remove these lines, how does the method remove the schema?

##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
##########
@@ -1027,14 +1006,7 @@ public void unloadNamespaceBundlesGracefully(int 
maxConcurrentUnload, boolean cl
                         new IllegalStateException("Delete forbidden topic is 
replicated on clusters " + clusters));
             }
 
-            if (deleteSchema) {
-                return t.deleteSchema().thenCompose(schemaVersion -> {
-                    log.info("Successfully delete topic {}'s schema of version 
{}", t.getName(), schemaVersion);
-                    return t.delete();
-                });

Review comment:
       If remove these lines how do we delete the schema?




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