zymap opened a new issue, #21075: URL: https://github.com/apache/pulsar/issues/21075
### Search before asking - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar. ### Version master ### Minimal reproduce step N/A ### What did you expect to see? Delete topic should also delete the topic policy ### What did you see instead? N/A ### Anything else? I found an interesting thing when deleting a topic through admin API. When the topic is loaded, it will delete the topic-level policy if it is enabled. But if the topic is not loaded, it will directly delete through managed ledger factory. But then we will leave the topic policy there. When the topic is created next time, it will use the old topic policy. Do you think we should clean up the topic policy as well if the topic is not loaded? https://github.com/apache/pulsar/blob/ee91edc3e08c87db1e5662a553ff62af0c1886e5/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java#L1144 ### Are you willing to submit a PR? - [ ] I'm willing to submit a PR! -- 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]
