You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2020/09/01 18:54:16 UTC

[lucene-solr] 02/11: @668 Trying to harden where an IW can leak - its being reopened by a late replication fetch it looks.

This is an automated email from the ASF dual-hosted git repository.

markrmiller pushed a commit to branch reference_impl
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit fc260731a0f6bbaf36dfd538a84ab3945a6edc9e
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Tue Sep 1 10:04:50 2020 -0500

    @668 Trying to harden where an IW can leak - its being reopened by a late replication fetch it looks.
---
 solr/core/src/java/org/apache/solr/update/SolrIndexWriter.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/update/SolrIndexWriter.java b/solr/core/src/java/org/apache/solr/update/SolrIndexWriter.java
index 73b2457..5a47a4d 100644
--- a/solr/core/src/java/org/apache/solr/update/SolrIndexWriter.java
+++ b/solr/core/src/java/org/apache/solr/update/SolrIndexWriter.java
@@ -119,14 +119,14 @@ public class SolrIndexWriter extends IndexWriter {
     try {
       dir = getDir(directoryFactory, path, config);
       iw = new SolrIndexWriter(core, name, directoryFactory, dir, create, schema, config, delPolicy, codec);
-    } catch (Exception e) {
+    } catch (Throwable e) {
       ParWork.propegateInterrupt(e);
       SolrException exp = new SolrException(SolrException.ErrorCode.SERVER_ERROR, e);
 
       if (iw != null) {
         try {
           iw.close();
-        } catch (IOException e1) {
+        } catch (Exception e1) {
           if (dir != null) {
             try {
               directoryFactory.release(dir);
@@ -145,6 +145,10 @@ public class SolrIndexWriter extends IndexWriter {
           }
         }
       }
+      if (e instanceof  Error) {
+        log.error("Exception constructing SolrIndexWriter", exp);
+        throw (Error) e;
+      }
       throw exp;
     }