From c69deb902680f62442fb70cb558968cb8ea9436f Mon Sep 17 00:00:00 2001 From: patsonluk Date: Mon, 26 Feb 2024 11:23:10 -0800 Subject: [PATCH] Cleanup --- solr/core/src/java/org/apache/solr/core/CoreContainer.java | 2 +- solr/core/src/java/org/apache/solr/core/SolrCoreProxy.java | 7 +------ .../org/apache/solr/servlet/CoordinatorHttpSolrCall.java | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) 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 af12039fc53..99f503258b8 100644 --- a/solr/core/src/java/org/apache/solr/core/CoreContainer.java +++ b/solr/core/src/java/org/apache/solr/core/CoreContainer.java @@ -1640,7 +1640,7 @@ public AllowListUrlChecker getAllowListUrlChecker() { * @return the newly created core */ @SuppressWarnings("resource") - public SolrCore createFromDescriptor( + private SolrCore createFromDescriptor( CoreDescriptor dcore, boolean publishState, boolean newCollection) { if (isShutDown) { diff --git a/solr/core/src/java/org/apache/solr/core/SolrCoreProxy.java b/solr/core/src/java/org/apache/solr/core/SolrCoreProxy.java index bd01f561fb0..bff8a1f4b80 100644 --- a/solr/core/src/java/org/apache/solr/core/SolrCoreProxy.java +++ b/solr/core/src/java/org/apache/solr/core/SolrCoreProxy.java @@ -11,10 +11,7 @@ public SolrCoreProxy(CoreContainer coreContainer, CoreDescriptor cd, ConfigSet c } public static SolrCoreProxy createAndRegisterProxy( - CoreContainer coreContainer, - String syntheticCollectionName, - String configSetName, - String todo) { + CoreContainer coreContainer, String syntheticCollectionName, String configSetName) { Map coreProps = new HashMap<>(); coreProps.put(CoreAdminParams.CORE_NODE_NAME, coreContainer.getHostName()); coreProps.put(CoreAdminParams.COLLECTION, syntheticCollectionName); @@ -22,9 +19,7 @@ public static SolrCoreProxy createAndRegisterProxy( CoreDescriptor syntheticCoreDescriptor = new CoreDescriptor( syntheticCollectionName, - // todo, Paths.get(coreContainer.getSolrHome() + "/" + syntheticCollectionName), - // Paths.get(coreContainer.getSolrHome() + "/" + todo), coreProps, coreContainer.getContainerProperties(), coreContainer.getZkController()); diff --git a/solr/core/src/java/org/apache/solr/servlet/CoordinatorHttpSolrCall.java b/solr/core/src/java/org/apache/solr/servlet/CoordinatorHttpSolrCall.java index cf3baf7e22a..b0aa18e7e9b 100644 --- a/solr/core/src/java/org/apache/solr/servlet/CoordinatorHttpSolrCall.java +++ b/solr/core/src/java/org/apache/solr/servlet/CoordinatorHttpSolrCall.java @@ -89,7 +89,7 @@ public static SolrCore getCore( CoreContainer coreContainer = solrCall.cores; SolrCoreProxy syntheticCore = SolrCoreProxy.createAndRegisterProxy( - coreContainer, syntheticCollectionName, coll.getConfigName(), collectionName); + coreContainer, syntheticCollectionName, coll.getConfigName()); // after this point the sync core should be available in the container. Double check if (coreContainer.getCore(syntheticCore.getName()) != null) {