lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hoss...@apache.org
Subject svn commit: r949885 - in /lucene/solr/branches/branch-1.4: ./ src/common/org/apache/solr/common/util/ src/java/org/apache/solr/handler/ src/java/org/apache/solr/request/
Date Mon, 31 May 2010 22:59:19 GMT
Author: hossman
Date: Mon May 31 22:59:19 2010
New Revision: 949885

URL: http://svn.apache.org/viewvc?rev=949885&view=rev
Log:
merging r898119 from solr/branches/branch-1.5-dev for SOLR-1538

Modified:
    lucene/solr/branches/branch-1.4/   (props changed)
    lucene/solr/branches/branch-1.4/CHANGES.txt
    lucene/solr/branches/branch-1.4/src/common/org/apache/solr/common/util/ConcurrentLRUCache.java
    lucene/solr/branches/branch-1.4/src/java/org/apache/solr/handler/BinaryUpdateRequestHandler.java
  (props changed)
    lucene/solr/branches/branch-1.4/src/java/org/apache/solr/handler/DumpRequestHandler.java
  (props changed)
    lucene/solr/branches/branch-1.4/src/java/org/apache/solr/handler/MoreLikeThisHandler.java
  (props changed)
    lucene/solr/branches/branch-1.4/src/java/org/apache/solr/request/RawResponseWriter.java
  (props changed)

Propchange: lucene/solr/branches/branch-1.4/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 31 22:59:19 2010
@@ -1 +1 @@
-/lucene/solr/trunk:881642,881906,882838,883566,891596,891889,903271,911245,919871,925898
+/lucene/solr/trunk:881642,881906,882838,883566,891596,891889,898119,903271,911245,919871,925898

Modified: lucene/solr/branches/branch-1.4/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/solr/branches/branch-1.4/CHANGES.txt?rev=949885&r1=949884&r2=949885&view=diff
==============================================================================
--- lucene/solr/branches/branch-1.4/CHANGES.txt (original)
+++ lucene/solr/branches/branch-1.4/CHANGES.txt Mon May 31 22:59:19 2010
@@ -85,6 +85,10 @@ Bug Fixes
 * SOLR-1522: Show proper message if <script> tag is missing for DIH 
   ScriptTransformer (noble)
 
+* SOLR-1538: Reordering of object allocations in ConcurrentLRUCache to eliminate
+  (an extremely small) potential for deadlock.
+  (gabriele renzi via hossman)
+
 ================== Release 1.4.0 ==================
 Release Date:  See http://lucene.apache.org/solr for the official release date.
 

Modified: lucene/solr/branches/branch-1.4/src/common/org/apache/solr/common/util/ConcurrentLRUCache.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/branch-1.4/src/common/org/apache/solr/common/util/ConcurrentLRUCache.java?rev=949885&r1=949884&r2=949885&view=diff
==============================================================================
--- lucene/solr/branches/branch-1.4/src/common/org/apache/solr/common/util/ConcurrentLRUCache.java
(original)
+++ lucene/solr/branches/branch-1.4/src/common/org/apache/solr/common/util/ConcurrentLRUCache.java
Mon May 31 22:59:19 2010
@@ -397,9 +397,9 @@ public class ConcurrentLRUCache<K,V> {
    * @return a LinkedHashMap containing 'n' or less than 'n' entries
    */
   public Map<K, V> getOldestAccessedItems(int n) {
-    markAndSweepLock.lock();
     Map<K, V> result = new LinkedHashMap<K, V>();
     TreeSet<CacheEntry> tree = new TreeSet<CacheEntry>();
+    markAndSweepLock.lock();
     try {
       for (Map.Entry<Object, CacheEntry> entry : map.entrySet()) {
         CacheEntry ce = entry.getValue();
@@ -423,10 +423,10 @@ public class ConcurrentLRUCache<K,V> {
   }
 
   public Map<K,V> getLatestAccessedItems(int n) {
-    // we need to grab the lock since we are changing lastAccessedCopy
-    markAndSweepLock.lock();
     Map<K,V> result = new LinkedHashMap<K,V>();
     TreeSet<CacheEntry> tree = new TreeSet<CacheEntry>();
+    // we need to grab the lock since we are changing lastAccessedCopy
+    markAndSweepLock.lock();
     try {
       for (Map.Entry<Object, CacheEntry> entry : map.entrySet()) {
         CacheEntry ce = entry.getValue();

Propchange: lucene/solr/branches/branch-1.4/src/java/org/apache/solr/handler/BinaryUpdateRequestHandler.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 31 22:59:19 2010
@@ -1 +1 @@
-/lucene/solr/trunk/src/java/org/apache/solr/handler/BinaryUpdateRequestHandler.java:881642,881906,882838,883566,891596,891889,903271,906553,911245,919871,925898
+/lucene/solr/trunk/src/java/org/apache/solr/handler/BinaryUpdateRequestHandler.java:881642,881906,882838,883566,891596,891889,898119,903271,906553,911245,919871,925898

Propchange: lucene/solr/branches/branch-1.4/src/java/org/apache/solr/handler/DumpRequestHandler.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 31 22:59:19 2010
@@ -1 +1 @@
-/lucene/solr/trunk/src/java/org/apache/solr/handler/DumpRequestHandler.java:881642,881906,882838,883566,891596,891889,903271,906553,911245,919871,925898
+/lucene/solr/trunk/src/java/org/apache/solr/handler/DumpRequestHandler.java:881642,881906,882838,883566,891596,891889,898119,903271,906553,911245,919871,925898

Propchange: lucene/solr/branches/branch-1.4/src/java/org/apache/solr/handler/MoreLikeThisHandler.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 31 22:59:19 2010
@@ -1 +1 @@
-/lucene/solr/trunk/src/java/org/apache/solr/handler/MoreLikeThisHandler.java:881642,881906,882838,883566,891596,891889,903271,906553,911245,919871,925898
+/lucene/solr/trunk/src/java/org/apache/solr/handler/MoreLikeThisHandler.java:881642,881906,882838,883566,891596,891889,898119,903271,906553,911245,919871,925898

Propchange: lucene/solr/branches/branch-1.4/src/java/org/apache/solr/request/RawResponseWriter.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 31 22:59:19 2010
@@ -1,2 +1,2 @@
-/lucene/solr/trunk/src/java/org/apache/solr/request/RawResponseWriter.java:881642,881906,882838,883566,891596,891889,903271,911245,919871,925898
+/lucene/solr/trunk/src/java/org/apache/solr/request/RawResponseWriter.java:881642,881906,882838,883566,891596,891889,898119,903271,911245,919871,925898
 /lucene/solr/trunk/src/java/org/apache/solr/response/RawResponseWriter.java:906553



Mime
View raw message