zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] maoling commented on a change in pull request #1077: ZOOKEEPER-3531: Synchronization on ACLCache cause cluster to hang whe…
Date Mon, 23 Sep 2019 02:37:46 GMT
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

Mime
View raw message