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/02/26 12:55:32 UTC

[GitHub] [pulsar] lhotari commented on issue #9711: Creating and modifying authorization policies in not thread safe

lhotari commented on issue #9711:
URL: https://github.com/apache/pulsar/issues/9711#issuecomment-786631166


   > When updating, a version will be passed in to determine whether the data has been modified. This is an optimistic lock. Why is there a thread safety issue?
   
   that part is not the concern. The concerns are the maps that are the maps contained in the cached AuthPolicies entry. They are mutated without synchronization on both read & write access. Mutation for example here:
   https://github.com/apache/pulsar/blob/7001f64aab6335b5192b408dba1e85602dd5ea6b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java#L688
   Accessed here:
   https://github.com/apache/pulsar/blob/1fab5aa69446b4c2eaebb615d35fe9f5a509ba4c/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java#L206
   
   


----------------------------------------------------------------
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:
users@infra.apache.org