svn commit: r1808197 - in /tomcat/tc7.0.x/trunk: java/org/apache/catalina/tribes/group/RpcChannel.java webapps/docs/changelog.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1808197 - in /tomcat/tc7.0.x/trunk: java/org/apache/catalina/tribes/group/RpcChannel.java webapps/docs/changelog.xml

kfujino
Author: kfujino
Date: Wed Sep 13 01:23:07 2017
New Revision: 1808197

URL: http://svn.apache.org/viewvc?rev=1808197&view=rev
Log:
Fix race condition of responseMap in RpcChannel.

Modified:
    tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java?rev=1808197&r1=1808196&r2=1808197&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java Wed Sep 13 01:23:07 2017
@@ -19,7 +19,8 @@ package org.apache.catalina.tribes.group
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.HashMap;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
 
 import org.apache.catalina.tribes.Channel;
 import org.apache.catalina.tribes.ChannelException;
@@ -48,7 +49,7 @@ public class RpcChannel implements Chann
     private byte[] rpcId;
     private int replyMessageOptions = 0;
 
-    private HashMap<RpcCollectorKey, RpcCollector> responseMap = new HashMap<RpcCollectorKey, RpcCollector>();
+    private ConcurrentMap<RpcCollectorKey, RpcCollector> responseMap = new ConcurrentHashMap<RpcCollectorKey, RpcCollector>();
 
     /**
      * Create an RPC channel. You can have several RPC channels attached to a group

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1808197&r1=1808196&r2=1808197&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Sep 13 01:23:07 2017
@@ -144,6 +144,10 @@
         Correct the backup node selection logic that node 0 is returned twice
         consecutively. (kfujino)
       </fix>
+      <fix>
+        Fix race condition of <code>responseMap</code> in
+        <code>RpcChannel</code>. (kfujino)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="jdbc-pool">



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]