You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2019/09/23 02:37:46 UTC

[GitHub] [zookeeper] maoling commented on a change in pull request #1077: ZOOKEEPER-3531: Synchronization on ACLCache cause cluster to hang whe…

maoling commented on a change in pull request #1077: ZOOKEEPER-3531: Synchronization on ACLCache cause cluster to hang whe…
URL: https://github.com/apache/zookeeper/pull/1077#discussion_r326935293
 
 

 ##########
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/ReferenceCountedACLCache.java
 ##########
 @@ -98,14 +99,14 @@ private long incrementIndex() {
         return ++aclIndex;
     }
 
-    public synchronized void deserialize(InputArchive ia) throws IOException {
+    public void deserialize(InputArchive ia) throws IOException {
         clear();
         int i = ia.readInt("map");
+
+        LinkedHashMap<Long, List<ACL>> deserializedMap = new LinkedHashMap<Long, List<ACL>>();
+        // keep read operations out of synchronization block
 
 Review comment:
    Map<Long, List<ACL>> clonedDeserializedMap = new LinkedHashMap<>();

----------------------------------------------------------------
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


With regards,
Apache Git Services