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 2022/03/01 08:54:16 UTC

[GitHub] [pulsar] Technoboy- commented on a change in pull request #14503: [Broker] Fixed wrong behaviour caused by not cleaning up topic policy service state.

Technoboy- commented on a change in pull request #14503:
URL: https://github.com/apache/pulsar/pull/14503#discussion_r816564409



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/SystemTopicBasedTopicPoliciesService.java
##########
@@ -382,10 +382,10 @@ private void readMorePolicies(SystemTopicClient.Reader<PulsarEvent> reader) {
             } else {
                 if (ex instanceof PulsarClientException.AlreadyClosedException) {
                     log.error("Read more topic policies exception, close the read now!", ex);
-                    NamespaceName namespace = reader.getSystemTopic().getTopicName().getNamespaceObject();
-                    ownedBundlesCountPerNamespace.remove(namespace);
-                    readerCaches.remove(namespace);
+                    cleanCacheAndCloseReader(
+                            reader.getSystemTopic().getTopicName().getNamespaceObject(), false);
                 } else {
+                    log.warn("Read more topic polices exception, read again. {}", ex.getMessage());

Review comment:
       Stack or message? I' not sure.




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