lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cpoersc...@apache.org
Subject [31/50] lucene-solr:jira/solr-9045: SOLR-9117: The first SolrCore is leaked after reload
Date Thu, 19 May 2016 09:35:31 GMT
SOLR-9117: The first SolrCore is leaked after reload


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

Branch: refs/heads/jira/solr-9045
Commit: d1202a8f8d223a6148e79628e63e7677dd4325a6
Parents: c3836a2
Author: Shalin Shekhar Mangar <shalin@apache.org>
Authored: Wed May 18 02:02:30 2016 +0530
Committer: Shalin Shekhar Mangar <shalin@apache.org>
Committed: Wed May 18 02:02:30 2016 +0530

----------------------------------------------------------------------
 solr/CHANGES.txt                                         |  1 +
 .../src/java/org/apache/solr/core/CoreContainer.java     |  1 -
 solr/core/src/java/org/apache/solr/core/SolrCores.java   | 11 -----------
 3 files changed, 1 insertion(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d1202a8f/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 5f5b389..b29417e 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -219,6 +219,7 @@ Bug Fixes
 
 * SOLR-9118: HashQParserPlugin should trim partition keys (Joel Bernstein)
 
+* SOLR-9117: The first SolrCore is leaked after reload. (Jessica Cheng via shalin)
 
 Optimizations
 ----------------------

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d1202a8f/solr/core/src/java/org/apache/solr/core/CoreContainer.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/core/CoreContainer.java b/solr/core/src/java/org/apache/solr/core/CoreContainer.java
index db9887c..ff776b5 100644
--- a/solr/core/src/java/org/apache/solr/core/CoreContainer.java
+++ b/solr/core/src/java/org/apache/solr/core/CoreContainer.java
@@ -834,7 +834,6 @@ public class CoreContainer {
       ConfigSet coreConfig = coreConfigService.getConfig(dcore);
       log.info("Creating SolrCore '{}' using configuration from {}", dcore.getName(), coreConfig.getName());
       core = new SolrCore(dcore, coreConfig);
-      solrCores.addCreated(core);
 
       // always kick off recovery if we are in non-Cloud mode
       if (!isZooKeeperAware() && core.getUpdateHandler().getUpdateLog() != null)
{

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d1202a8f/solr/core/src/java/org/apache/solr/core/SolrCores.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/core/SolrCores.java b/solr/core/src/java/org/apache/solr/core/SolrCores.java
index af287b7..8a4af9f 100644
--- a/solr/core/src/java/org/apache/solr/core/SolrCores.java
+++ b/solr/core/src/java/org/apache/solr/core/SolrCores.java
@@ -51,8 +51,6 @@ class SolrCores {
 
   private final Map<String, CoreDescriptor> dynamicDescriptors = new LinkedHashMap<>();
 
-  private final Map<String, SolrCore> createdCores = new LinkedHashMap<>();
-
   private final CoreContainer container;
   
   private Set<String> currentlyLoadingCores = Collections.newSetFromMap(new ConcurrentHashMap<String,Boolean>());
@@ -213,7 +211,6 @@ class SolrCores {
       set.addAll(cores.keySet());
       set.addAll(transientCores.keySet());
       set.addAll(dynamicDescriptors.keySet());
-      set.addAll(createdCores.keySet());
     }
     return set;
   }
@@ -261,8 +258,6 @@ class SolrCores {
       // in particular should be checked. It could have been a dynamic core.
       tmp = transientCores.remove(name);
       ret = (ret == null) ? tmp : ret;
-      tmp = createdCores.remove(name);
-      ret = (ret == null) ? tmp : ret;
       dynamicDescriptors.remove(name);
       return ret;
     }
@@ -407,12 +402,6 @@ class SolrCores {
     return null;
   }
 
-  protected void addCreated(SolrCore core) {
-    synchronized (modifyLock) {
-      createdCores.put(core.getName(), core);
-    }
-  }
-
   /**
    * Return the CoreDescriptor corresponding to a given core name.
    * Blocks if the SolrCore is still loading until it is ready.


Mime
View raw message