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 20:34:23 UTC

[lucene-solr] branch reference_impl_dev updated: @744 Try harder.

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

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


The following commit(s) were added to refs/heads/reference_impl_dev by this push:
     new 2400c15  @744 Try harder.
2400c15 is described below

commit 2400c151f99302b0579d0dd33f7ed845c1b459f3
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Fri Sep 4 15:34:02 2020 -0500

    @744 Try harder.
---
 solr/core/src/java/org/apache/solr/update/UpdateLog.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/solr/core/src/java/org/apache/solr/update/UpdateLog.java b/solr/core/src/java/org/apache/solr/update/UpdateLog.java
index e27732d..441c3a0 100644
--- a/solr/core/src/java/org/apache/solr/update/UpdateLog.java
+++ b/solr/core/src/java/org/apache/solr/update/UpdateLog.java
@@ -365,6 +365,9 @@ public class UpdateLog implements PluginInfoInitialized, SolrMetricProducer {
    * for an existing log whenever the core or update handler changes.
    */
   public void init(UpdateHandler uhandler, SolrCore core) {
+    if (dataDir != null) {
+      ObjectReleaseTracker.release(this);
+    }
     ObjectReleaseTracker.track(this);
     try {
       dataDir = core.getUlogDir();
@@ -445,10 +448,10 @@ public class UpdateLog implements PluginInfoInitialized, SolrMetricProducer {
       core.getCoreMetricManager().registerMetricProducer(SolrInfoBean.Category.TLOG.toString(), this);
     } catch (Throwable e) {
       ParWork.propegateInterrupt(e);
+      ObjectReleaseTracker.release(this);
       if (e instanceof Error) {
         throw e;
       }
-      ObjectReleaseTracker.release(this);
     }
   }