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/12/09 06:18:19 UTC

[GitHub] [pulsar] ciaocloud commented on a change in pull request #13195: [pulsar-broker] Support of TopicLifecyclePolicies REST handler.

ciaocloud commented on a change in pull request #13195:
URL: https://github.com/apache/pulsar/pull/13195#discussion_r765461560



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
##########
@@ -2485,6 +2493,13 @@ private boolean shouldTopicBeRetained() {
         //If the topic-level policy already exists, the namespace-level policy cannot override the topic-level policy.
         Optional<TopicPolicies> topicPolicies = getTopicPolicies();
 
+        if (data.topicLifecycle != null) {
+            // reset new inactiveTopicPolicies with topicLifecycle info if one exists
+            this.topicPolicies.getInactiveTopicPolicies().updateBrokerValue(

Review comment:
       we wished to set the `inactiveTopicPolicies` as the new one, isn't it the right way to do it with your recent changes? in 2.9, the `inactiveTopicPolicies` was a member field in PersistentTopic.




-- 
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: commits-unsubscribe@pulsar.apache.org

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