lhotari commented on pull request #9850:
URL: https://github.com/apache/pulsar/pull/9850#issuecomment-796594923


   > I thought of these solutions:
   > 
   > 1 Tag Policies with the version of zk, lock them when reading the cache, 
and clone a copy of Policies. When updating to zk, if the version is incorrect, 
re-read the latest cache of zk and redo the modification, and then update.
   > 
   > 2 In the unit of namespace, all namespace operations are put into 
orderExecutor, and each namespace is processed by a fixed thread. Then call 
back.
   > 
   > I tend to use method 2, and this PR will be closed
   > 
   
   Sounds good. It would be useful to write a separate issue which explains the 
current challenges in updating policies in a distributed setup with multiple 
brokers. 
   
   The only problem with this approach is that we cannot close 9711 before the 
other PRs are delivered. I can  provide a fix for 9711 in the meantime (before 
the ZK & single writer approach is delivered) using Map.compute. That could 
become obsolete later, but it doesn't cause any harm to do that as an 
intermediate step since it would fix 9711.
   
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to