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/04 11:16:09 UTC

[lucene-solr] 03/13: @722 Try and prevent UpdateLog leak.

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 c22e43ec8f88eece9548ec01941a0076a8d818fc
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Thu Sep 3 11:56:10 2020 -0500

    @722 Try and prevent UpdateLog leak.
---
 solr/core/src/java/org/apache/solr/update/UpdateHandler.java | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/update/UpdateHandler.java b/solr/core/src/java/org/apache/solr/update/UpdateHandler.java
index 95dc7e4..6dde152 100644
--- a/solr/core/src/java/org/apache/solr/update/UpdateHandler.java
+++ b/solr/core/src/java/org/apache/solr/update/UpdateHandler.java
@@ -160,9 +160,6 @@ UpdateHandler implements SolrInfoBean, Closeable {
         }
         ourUpdateLog.init(ulogPluginInfo);
         ourUpdateLog.init(this, core);
-        if (updateLog != null) {
-          updateLog.close();
-        }
       } else {
         ourUpdateLog = updateLog;
       }
@@ -170,9 +167,9 @@ UpdateHandler implements SolrInfoBean, Closeable {
       IOUtils.closeQuietly(ourUpdateLog);
       ObjectReleaseTracker.release(this);
       throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e);
+    } finally {
+      ulog = ourUpdateLog;
     }
-
-    ulog = ourUpdateLog;
   }
 
   /**