svn commit: r1808195 - in /tomcat/tc8.5.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: r1808195 - in /tomcat/tc8.5.x/trunk: java/org/apache/catalina/tribes/group/RpcChannel.java webapps/docs/changelog.xml

kfujino
Author: kfujino
Date: Wed Sep 13 01:21:14 2017
New Revision: 1808195

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

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

Modified: tomcat/tc8.5.x/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java?rev=1808195&r1=1808194&r2=1808195&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java (original)
+++ tomcat/tc8.5.x/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java Wed Sep 13 01:21:14 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;
@@ -49,7 +50,7 @@ public class RpcChannel implements Chann
     private byte[] rpcId;
     private int replyMessageOptions = 0;
 
-    private final HashMap<RpcCollectorKey, RpcCollector> responseMap = new HashMap<>();
+    private final ConcurrentMap<RpcCollectorKey, RpcCollector> responseMap = new ConcurrentHashMap<>();
 
     /**
      * Create an RPC channel. You can have several RPC channels attached to a group

Modified: tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml?rev=1808195&r1=1808194&r2=1808195&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml Wed Sep 13 01:21:14 2017
@@ -218,6 +218,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]