mirror of https://github.com/apache/lucene.git
SOLR-8189: Use WeakIdentityMap.newConcurrentHashMap instead of a synchronized WeakHashMap for better concurrency
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1710366 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fe22692ad2
commit
b9ac587c32
|
@ -27,6 +27,7 @@ import java.util.List;
|
|||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.lucene.util.WeakIdentityMap;
|
||||
import org.apache.solr.common.util.SuppressForbidden;
|
||||
import org.apache.solr.core.IndexDeletionPolicyWrapper;
|
||||
import org.apache.solr.core.SolrCore;
|
||||
|
@ -56,7 +57,7 @@ public final class HttpCacheHeaderUtil {
|
|||
*
|
||||
* @see #calcEtag
|
||||
*/
|
||||
private static Map<SolrCore, EtagCacheVal> etagCoreCache = Collections.synchronizedMap(new WeakHashMap<>());
|
||||
private static WeakIdentityMap<SolrCore, EtagCacheVal> etagCoreCache = WeakIdentityMap.newConcurrentHashMap();
|
||||
|
||||
/** @see #etagCoreCache */
|
||||
private static class EtagCacheVal {
|
||||
|
|
Loading…
Reference in New Issue