SOLR-8189: eTag calculation during HTTP Cache Validation uses unsynchronized WeakHashMap causing threads to be stuck in runnable state

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1710218 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2015-10-23 14:03:49 +00:00
parent 308d0101f3
commit 3a4b4310b4
2 changed files with 4 additions and 2 deletions

View File

@ -288,6 +288,9 @@ Bug Fixes
* SOLR-7843: DataImportHandler's delta imports leak memory because the delta keys are kept in memory
and not cleared after the process is finished. (Pablo Lozano via shalin)
* SOLR-8189: eTag calculation during HTTP Cache Validation uses unsynchronized WeakHashMap causing
threads to be stuck in runnable state. (shalin)
Optimizations
----------------------

View File

@ -56,8 +56,7 @@ public final class HttpCacheHeaderUtil {
*
* @see #calcEtag
*/
private static Map<SolrCore, EtagCacheVal> etagCoreCache
= new WeakHashMap<>();
private static Map<SolrCore, EtagCacheVal> etagCoreCache = Collections.synchronizedMap(new WeakHashMap<>());
/** @see #etagCoreCache */
private static class EtagCacheVal {