Jason918 commented on a change in pull request #13720:
URL: https://github.com/apache/pulsar/pull/13720#discussion_r782809887
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
##########
@@ -1383,7 +1383,8 @@ public void closeFailed(ManagedLedgerException exception,
Object ctx) {
log.debug("[{}] Checking replication status", name);
}
- List<String> configuredClusters =
topicPolicies.getReplicationClusters().get();
+ List<String> configuredClusters =
topicPolicies.getReplicationClusters().get() == null
Review comment:
> There was null checker in previous code
It's not the same implementation.
After looking into the codes, it's possible that this policy could be null
if the namespace policy is invalid or deleted somehow.
A better solution would be add the following code in
`org.apache.pulsar.broker.service.AbstractTopic#updateTopicPolicyByBrokerConfig`:
`topicPolicies.getReplicationClusters().updateBrokerValue(Collections.emptyList());`
--
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]