You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/06/24 03:09:17 UTC

[GitHub] [pulsar] 315157973 commented on a change in pull request #11051: Add authoritative flag for topic policy to avoid redirect loop

315157973 commented on a change in pull request #11051:
URL: https://github.com/apache/pulsar/pull/11051#discussion_r657584505



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
##########
@@ -2686,13 +2652,8 @@ private RetentionPolicies getRetentionPolicies(TopicName topicName, TopicPolicie
         return retentionPolicies;
     }
 
-    protected void internalRemoveBacklogQuota(AsyncResponse asyncResponse,
-            BacklogQuota.BacklogQuotaType backlogQuotaType) {
-        internalSetBacklogQuota(asyncResponse, backlogQuotaType, null);
-    }
-
-    protected void internalGetRetention(AsyncResponse asyncResponse, boolean applied){
-        RetentionPolicies retentionPolicies = getTopicPolicies(topicName)
+    protected RetentionPolicies internalGetRetention(boolean applied) {

Review comment:
       Why not use CompletableFuture ?

##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/SystemTopicBasedTopicPoliciesService.java
##########
@@ -390,7 +390,6 @@ public void clean(TopicName topicName) {
             //change persistent://tenant/namespace/xxx-partition-0  to persistent://tenant/namespace/xxx
             realTopicName = TopicName.get(topicName.getPartitionedTopicName());
         }
-        policiesCache.remove(realTopicName);

Review comment:
       We must at least clean up this cache when deleting topics, right?
   If there are other topics in the Namespace that have been used, but some topics have been deleted, these deleted topics will be stored in the memory forever. We should find a way to put it in the cache when `Own Bundle` is triggered by the same topic, instead of keeping it in the cache without deleting it.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org