zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cami...@apache.org
Subject svn commit: r1509780 - in /zookeeper/branches/branch-3.4: CHANGES.txt src/java/main/org/apache/zookeeper/server/ServerCnxnFactory.java
Date Fri, 02 Aug 2013 17:07:07 GMT
Author: camille
Date: Fri Aug  2 17:07:06 2013
New Revision: 1509780

URL: http://svn.apache.org/r1509780
Log:
ZOOKEEPER-1731. Unsynchronized access to ServerCnxnFactory.connectionBeans results in 
  deadlock. (Dave Latham via camille)
  

Modified:
    zookeeper/branches/branch-3.4/CHANGES.txt
    zookeeper/branches/branch-3.4/src/java/main/org/apache/zookeeper/server/ServerCnxnFactory.java

Modified: zookeeper/branches/branch-3.4/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.4/CHANGES.txt?rev=1509780&r1=1509779&r2=1509780&view=diff
==============================================================================
--- zookeeper/branches/branch-3.4/CHANGES.txt (original)
+++ zookeeper/branches/branch-3.4/CHANGES.txt Fri Aug  2 17:07:06 2013
@@ -81,6 +81,9 @@ BUGFIXES:
 
   ZOOKEEPER-1629. testTransactionLogCorruption occasionally fails. (shralex via camille)
 
+  ZOOKEEPER-1731. Unsynchronized access to ServerCnxnFactory.connectionBeans results in 
+  deadlock. (Dave Latham via camille)
+  
 IMPROVEMENTS:
 
   ZOOKEEPER-1564. Allow JUnit test build with IBM Java

Modified: zookeeper/branches/branch-3.4/src/java/main/org/apache/zookeeper/server/ServerCnxnFactory.java
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.4/src/java/main/org/apache/zookeeper/server/ServerCnxnFactory.java?rev=1509780&r1=1509779&r2=1509780&view=diff
==============================================================================
--- zookeeper/branches/branch-3.4/src/java/main/org/apache/zookeeper/server/ServerCnxnFactory.java
(original)
+++ zookeeper/branches/branch-3.4/src/java/main/org/apache/zookeeper/server/ServerCnxnFactory.java
Fri Aug  2 17:07:06 2013
@@ -21,8 +21,9 @@ package org.apache.zookeeper.server;
 import java.io.IOException;
 import java.net.InetSocketAddress;
 import java.nio.ByteBuffer;
-import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import javax.security.auth.login.Configuration;
 import javax.security.auth.login.LoginException;
@@ -128,7 +129,8 @@ public abstract class ServerCnxnFactory 
 
     public abstract InetSocketAddress getLocalAddress();
 
-    private final HashMap<ServerCnxn, ConnectionBean> connectionBeans = new HashMap<ServerCnxn,
ConnectionBean>();
+    private final Map<ServerCnxn, ConnectionBean> connectionBeans
+        = new ConcurrentHashMap<ServerCnxn, ConnectionBean>();
 
     protected final HashSet<ServerCnxn> cnxns = new HashSet<ServerCnxn>();
     public void unregisterConnection(ServerCnxn serverCnxn) {



Mime
View raw message