lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject [3/3] lucene-solr:master: SOLR-10120: Clean up earlier so we don't hit closed resources.
Date Sat, 18 Feb 2017 02:23:11 GMT
SOLR-10120: Clean up earlier so we don't hit closed resources.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/19c8ec2b
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/19c8ec2b
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/19c8ec2b

Branch: refs/heads/master
Commit: 19c8ec2bf1882bed1bb34d0b55198d03f2018838
Parents: ed05deb
Author: markrmiller <markrmiller@apache.org>
Authored: Fri Feb 17 11:30:39 2017 -0500
Committer: markrmiller <markrmiller@apache.org>
Committed: Fri Feb 17 21:22:44 2017 -0500

----------------------------------------------------------------------
 solr/core/src/java/org/apache/solr/core/SolrCore.java | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/19c8ec2b/solr/core/src/java/org/apache/solr/core/SolrCore.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/core/SolrCore.java b/solr/core/src/java/org/apache/solr/core/SolrCore.java
index 9e01374..b108b38 100644
--- a/solr/core/src/java/org/apache/solr/core/SolrCore.java
+++ b/solr/core/src/java/org/apache/solr/core/SolrCore.java
@@ -1505,6 +1505,14 @@ public final class SolrCore implements SolrInfoMBean, Closeable {
         throw (Error) e;
       }
     }
+    
+    if (coreStateClosed) {
+      try {
+        cleanupOldIndexDirectories(false);
+      } catch (Exception e) {
+        SolrException.log(log, e);
+      }
+    }
 
     try {
       infoRegistry.clear();
@@ -1536,11 +1544,6 @@ public final class SolrCore implements SolrInfoMBean, Closeable {
     }
 
     if (coreStateClosed) {
-      try {
-        cleanupOldIndexDirectories(false);
-      } catch (Exception e) {
-        SolrException.log(log, e);
-      }
       
       try {
         directoryFactory.close();


Mime
View raw message