You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2015/10/23 16:04:52 UTC

svn commit: r1710219 - in /lucene/dev/branches/branch_5x: ./ solr/ solr/CHANGES.txt solr/core/ solr/core/src/java/org/apache/solr/servlet/cache/HttpCacheHeaderUtil.java

Author: shalin
Date: Fri Oct 23 14:04:52 2015
New Revision: 1710219

URL: http://svn.apache.org/viewvc?rev=1710219&view=rev
Log:
SOLR-8189: eTag calculation during HTTP Cache Validation uses unsynchronized WeakHashMap causing threads to be stuck in runnable state

Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/solr/   (props changed)
    lucene/dev/branches/branch_5x/solr/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/branch_5x/solr/core/   (props changed)
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/cache/HttpCacheHeaderUtil.java

Modified: lucene/dev/branches/branch_5x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/CHANGES.txt?rev=1710219&r1=1710218&r2=1710219&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_5x/solr/CHANGES.txt Fri Oct 23 14:04:52 2015
@@ -176,6 +176,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
 ----------------------

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/cache/HttpCacheHeaderUtil.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/cache/HttpCacheHeaderUtil.java?rev=1710219&r1=1710218&r2=1710219&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/cache/HttpCacheHeaderUtil.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/cache/HttpCacheHeaderUtil.java Fri Oct 23 14:04:52 2015
@@ -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 {