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 2022/04/13 11:29:48 UTC

[GitHub] [pulsar] shibd commented on pull request #15139: [fix][broker]Fix create topic fail deadlock

shibd commented on PR #15139:
URL: https://github.com/apache/pulsar/pull/15139#issuecomment-1097939550

   In order to avoid the same problem, do we need to improve `ConcurrentOpenHashMap`?
   
   In `ConcurrentHashMap`, The same operation throws an exception, which makes it easier to spot the problem.
   
   For example below:
   ```        
   Map<String, String> map = new ConcurrentHashMap<>();
   
   map.computeIfAbsent("test", (key) -> {
       map.remove("test");
       return "ok";
   });
   ```
   
   It will throw `java.lang.IllegalStateException: Recursive update`


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

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