From notifications-return-1935-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Mon Sep 23 02:37:47 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 1FF6318067C for ; Mon, 23 Sep 2019 04:37:47 +0200 (CEST) Received: (qmail 71710 invoked by uid 500); 23 Sep 2019 02:37:46 -0000 Mailing-List: contact notifications-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list notifications@zookeeper.apache.org Received: (qmail 71662 invoked by uid 99); 23 Sep 2019 02:37:46 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Sep 2019 02:37:46 +0000 From: GitBox To: notifications@zookeeper.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bzookeeper=5D_maoling_commented_on_a_change_in_p?= =?utf-8?q?ull_request_=231077=3A_ZOOKEEPER-3531=3A_Synchronization_on_ACL?= =?utf-8?q?Cache_cause_cluster_to_hang_whe=E2=80=A6?= Message-ID: <156920626645.7497.15265323044783149585.gitbox@gitbox.apache.org> Date: Mon, 23 Sep 2019 02:37:46 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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> deserializedMap = new LinkedHashMap>(); + // keep read operations out of synchronization block Review comment: Map> 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