lhotari commented on PR #21030:
URL: https://github.com/apache/pulsar/pull/21030#issuecomment-3182344849

   The problem has been addressed with ["PIP-428: Change TopicPoliciesService 
interface to fix consistency 
issues"](https://github.com/apache/pulsar/blob/master/pip/pip-428.md) and the 
implementation PR #24427.
   
   One of the main differences compared to the approach in this PR is that 
existing TopicPolicies instances are never mutated. Instead, the existing 
instance is cloned and the mutation happens on the cloned instance. This 
ensures that threads that are referencing the instance won't get an 
inconsistent view on the instance. The mutation will be atomic from this 
perspective and become available via the cache. [A similar pattern is used for 
namespace policy 
updates](https://github.com/apache/pulsar/blob/bbf56f651ebe357745b46654a1d9fb7dc4899fd7/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/resources/NamespaceResources.java#L140-L146).


-- 
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-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to