lhotari opened a new issue #9711: URL: https://github.com/apache/pulsar/issues/9711
**Describe the bug** Creating and modifying authorization policies is not thread safe. It leads to unexpected NullPointerExceptions for example and could lead to authorization data corruption. **To Reproduce** The flaky test #9709 is one example of the problem. **Expected behavior** Creating and modifying authorization policies should be thread safe. **Observations** It looks like the [org.apache.pulsar.common.policies.data.AuthPolicies](https://github.com/apache/pulsar/blob/master/pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/AuthPolicies.java) data structures are modified without a way to ensure thread safety and data consistency. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org