yuruguo commented on a change in pull request #12983:
URL: https://github.com/apache/pulsar/pull/12983#discussion_r759138061



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
##########
@@ -4237,6 +4237,17 @@ protected void internalGetLastMessageId(AsyncResponse 
asyncResponse, boolean aut
             });
     }
 
+    protected CompletableFuture<Void> internalRemoveSubscriptionTypesEnabled() 
{
+        return getTopicPoliciesAsyncWithRetry(topicName)
+                .thenCompose(op -> {
+                    if (!op.isPresent()) {
+                        return CompletableFuture.completedFuture(null);
+                    }
+                    op.get().setSubscriptionTypesEnabled(Lists.newArrayList());

Review comment:
       Many topic policy `set`&`remove` operations are implemented in this way, 
so they all need to be adjusted, as below:
   
https://github.com/apache/pulsar/blob/aa97d39e14ba0b26ce8975bf9490c709931753c5/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java#L3012-L3020
   
https://github.com/apache/pulsar/blob/aa97d39e14ba0b26ce8975bf9490c709931753c5/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java#L3022-L3031




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