tflobbe commented on a change in pull request #1815:
URL: https://github.com/apache/lucene-solr/pull/1815#discussion_r483251942
##
File path: solr/core/src/java/org/apache/solr/core/ConfigSetService.java
##
@@ -81,8 +81,7 @@ public final ConfigSet loadConfigSet(CoreDescriptor dcore) {
) ? false: true;
SolrConfig solrConfig = createSolrConfig(dcore, coreLoader, trusted);
- IndexSchema indexSchema = createIndexSchema(dcore, solrConfig, false);
- return new ConfigSet(configSetName(dcore), solrConfig, force ->
indexSchema, properties, trusted);
+ return new ConfigSet(configSetName(dcore), solrConfig, force ->
createIndexSchema(dcore, solrConfig, force), properties, trusted);
Review comment:
Does this mean that every call to `configSet.getIndexSchema()` will
create a new schema object?
##
File path: solr/core/src/java/org/apache/solr/core/SolrCores.java
##
@@ -282,15 +283,19 @@ protected SolrCore remove(String name) {
return ret;
}
}
+ SolrCore getCoreFromAnyList(String name, boolean incRefCount) {
+return getCoreFromAnyList(name, incRefCount, null);
+ }
/* If you don't increment the reference count, someone could close the core
before you use it. */
- SolrCore getCoreFromAnyList(String name, boolean incRefCount) {
+ SolrCore getCoreFromAnyList(String name, boolean incRefCount, UUID coreId) {
synchronized (modifyLock) {
SolrCore core = cores.get(name);
if (core == null && getTransientCacheHandler() != null) {
core = getTransientCacheHandler().getCore(name);
}
+ if(core != null && coreId != null && coreId != core.uniqueId) return
null;
Review comment:
mind putting the space after the `if` (here and in the rest of your
changes)? that's the standard across the rest of the code AFAIK
##
File path: solr/core/src/java/org/apache/solr/core/CoreContainer.java
##
@@ -1582,6 +1582,13 @@ private CoreDescriptor
reloadCoreDescriptor(CoreDescriptor oldDesc) {
public void reload(String name) {
reload(name, null);
}
+ public void reload(String name, UUID coreId, boolean async) {
+if(async) {
+ runAsync(() -> reload(name, coreId));
+} else {
+ reload(name, coreId);
+}
+ }
Review comment:
Why is this method added? you don't seem to be doing any async reloads.
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org
-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org