SOLR-9117: The first SolrCore is leaked after reload

(cherry picked from commit d1202a8)
This commit is contained in:
Shalin Shekhar Mangar 2016-05-18 02:02:30 +05:30
parent b1b9015290
commit ba7698e4e7
3 changed files with 2 additions and 12 deletions

View File

@ -188,6 +188,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)
Optimizations
----------------------
* SOLR-8722: Don't force a full ZkStateReader refresh on every Overseer operation.

View File

@ -810,7 +810,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) {

View File

@ -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.