lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sar...@apache.org
Subject lucene-solr:branch_6_0: SOLR-9117: The first SolrCore is leaked after reload (cherry picked from commit d1202a8)
Date Fri, 20 May 2016 22:51:51 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6_0 1272c02ea -> 3e19c5ad1


SOLR-9117: The first SolrCore is leaked after reload
(cherry picked from commit d1202a8)


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

Branch: refs/heads/branch_6_0
Commit: 3e19c5ad1b1a401c9ccc491d8d2c95bd0878424d
Parents: 1272c02
Author: Shalin Shekhar Mangar <shalin@apache.org>
Authored: Wed May 18 02:02:30 2016 +0530
Committer: Steve Rowe <sarowe@apache.org>
Committed: Fri May 20 18:49:53 2016 -0400

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


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3e19c5ad/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index fa376a1..a36754d 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -79,6 +79,8 @@ Bug Fixes
 
 * SOLR-9118: HashQParserPlugin should trim partition keys (Joel Bernstein)
 
+* SOLR-9117: The first SolrCore is leaked after reload. (Jessica Cheng via shalin)
+
 Other Changes
 ----------------------
 * SOLR-7516: Improve javadocs for JavaBinCodec, ObjectResolver and enforce the single-usage
policy.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3e19c5ad/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 b86cd9e..489c954 100644
--- a/solr/core/src/java/org/apache/solr/core/CoreContainer.java
+++ b/solr/core/src/java/org/apache/solr/core/CoreContainer.java
@@ -815,7 +815,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/3e19c5ad/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 86fab0d..77c286e 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>());
@@ -216,7 +214,6 @@ class SolrCores {
       set.addAll(cores.keySet());
       set.addAll(transientCores.keySet());
       set.addAll(dynamicDescriptors.keySet());
-      set.addAll(createdCores.keySet());
     }
     return set;
   }
@@ -264,8 +261,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;
     }
@@ -410,12 +405,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