Author: sebb
Date: Tue Oct 4 17:09:01 2011
New Revision: 1178867
URL: http://svn.apache.org/viewvc?rev=1178867&view=rev
Log:
Bug 51942 - Synchronisation issue on CacheManager when Concurrent Download is
used
Modified:
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CacheManager.java
jakarta/jmeter/trunk/xdocs/changes.xml
Modified:
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CacheManager.java
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CacheManager.java?rev=1178867&r1=1178866&r2=1178867&view=diff
==============================================================================
---
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CacheManager.java
(original)
+++
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CacheManager.java
Tue Oct 4 17:09:01 2011
@@ -24,9 +24,9 @@ import java.io.Serializable;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
-import java.util.HashMap;
-import java.util.Map;
import java.util.Date;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
import org.apache.commons.httpclient.HttpMethod;
import org.apache.commons.httpclient.URIException;
@@ -331,7 +331,8 @@ public class CacheManager extends Config
threadCache = new InheritableThreadLocal<Map<String, CacheEntry>>(){
@Override
protected Map<String, CacheEntry> initialValue(){
- return new HashMap<String, CacheEntry>();
+ // Bug 51942 - this map may be used from multiple threads
+ return new ConcurrentHashMap<String, CacheEntry>();
}
};
}
Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=1178867&r1=1178866&r2=1178867&view=diff
==============================================================================
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Tue Oct 4 17:09:01 2011
@@ -83,6 +83,7 @@ This has been corrected; can still rever
<li>Bug 51932 - CacheManager does not handle cache-control header with any
attributes after max-age</li>
<li>Bug 51918 - GZIP compressed traffic produces errors, when multiple
connections allowed</li>
<li>Bug 51939 - Should generate new parent sample if necessary when retrieving
embedded resources</li>
+<li>Bug 51942 - Synchronisation issue on CacheManager when Concurrent Download
is used</li>
</ul>
<h3>Other Samplers</h3>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]