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



##########
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:
       We should not modify a object that could be the result of a read from a 
cache 




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