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



##########
File path: 
pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/PolicyHierarchyValue.java
##########
@@ -36,6 +36,8 @@
     @Getter
     private volatile T namespaceValue;
 
+    @VisibleForTesting

Review comment:
       Now that there is a getter, why do we need VisibleForTesting?

##########
File path: 
pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/TopicPoliciesTest.java
##########
@@ -1958,8 +1968,25 @@ private void doTestTopicMaxMessageSize(boolean 
isPartitioned) throws Exception {
         assertNull(admin.topicPolicies().getMaxMessageSize(topic));
         // set msg size
         admin.topicPolicies().setMaxMessageSize(topic, 10);
-        Awaitility.await().until(()
-                -> 
pulsar.getTopicPoliciesService().getTopicPolicies(TopicName.get(topic)) != 
null);

Review comment:
       We should not remove this judgment. Even if it is a partitioned topic, 
only the topic without -partition- will be saved in the Topic Policy.
   
   For example: persistent://tenant/namespace/topic-partition has 10 
partitions, only one copy of data will be saved in Topic Policy, and the key is 
persistent://tenant/namespace/topic-partition




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