This is an automated email from the ASF dual-hosted git repository.

markt-asf pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new d7a5426d19 Fix issues with concurrent read/write of standard HashMap
d7a5426d19 is described below

commit d7a5426d1980c7d8eb578281c936a2cdc599597e
Author: Mark Thomas <[email protected]>
AuthorDate: Tue Jun 9 11:56:01 2026 +0100

    Fix issues with concurrent read/write of standard HashMap
---
 .../catalina/tribes/group/interceptors/FragmentationInterceptor.java | 5 +++--
 webapps/docs/changelog.xml                                           | 4 ++++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git 
a/java/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java
 
b/java/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java
index 7a5f5aec8c..51e0f093ef 100644
--- 
a/java/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java
+++ 
b/java/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java
@@ -17,8 +17,9 @@
 package org.apache.catalina.tribes.group.interceptors;
 
 import java.util.Arrays;
-import java.util.HashMap;
+import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.catalina.tribes.ChannelException;
 import org.apache.catalina.tribes.ChannelMessage;
@@ -57,7 +58,7 @@ public class FragmentationInterceptor extends 
ChannelInterceptorBase implements
     /**
      * Map of fragment keys to their fragment collections for reassembly.
      */
-    protected final HashMap<FragKey,FragCollection> fragpieces = new 
HashMap<>();
+    protected final Map<FragKey,FragCollection> fragpieces = new 
ConcurrentHashMap<>();
     private int maxSize = 1024 * 100;
     private long expire = 1000 * 60; // one minute expiration
     /**
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 3bf90922ad..dfc77053d3 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -333,6 +333,10 @@
         Ensure listeners are correctly added and removed when configuring the
         channel coordinator. (markt)
       </fix>
+      <fix>
+        Fix some concurrency issues in <code>FragmentationInterceptor</code>.
+        (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="WebSocket">


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

Reply via email to