lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Miller (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-4005) If CoreContainer fails to register a created core, it should close it.
Date Mon, 29 Oct 2012 16:14:12 GMT

    [ https://issues.apache.org/jira/browse/SOLR-4005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13486112#comment-13486112
] 

Mark Miller commented on SOLR-4005:
-----------------------------------

Simple change:

{noformat}lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/CoreContainer.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/CoreContainer.java Mon Oct 29
16:10:39 2012
@@ -482,6 +482,7 @@ public class CoreContainer 

    for (int i=0; i<nodes.getLength(); i++) {
      Node node = nodes.item(i);
+      SolrCore core = null;
      try {
        String rawName = DOMUtil.getAttr(node, CORE_NAME, null);
        if (null == rawName) {
@@ -526,7 +527,7 @@ public class CoreContainer 

        p.setCoreProperties(readProperties(cfg, node));

-        SolrCore core = create(p);
+        core  = create(p);
        register(name, core, false);

        // track original names
@@ -534,6 +535,9 @@ public class CoreContainer 
      }
      catch (Throwable ex) {
        SolrException.log(log,null,ex);
+        if (core != null) {
+          core.close();
+        }
      }
    }
  }{noformat}
                
> If CoreContainer fails to register a created core, it should close it.
> ----------------------------------------------------------------------
>
>                 Key: SOLR-4005
>                 URL: https://issues.apache.org/jira/browse/SOLR-4005
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Mark Miller
>            Assignee: Mark Miller
>            Priority: Minor
>             Fix For: 4.1, 5.0
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message