Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
patsonluk committed Feb 26, 2024
1 parent 959ab57 commit c69deb9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion solr/core/src/java/org/apache/solr/core/CoreContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
7 changes: 1 addition & 6 deletions solr/core/src/java/org/apache/solr/core/SolrCoreProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,15 @@ 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<String, String> coreProps = new HashMap<>();
coreProps.put(CoreAdminParams.CORE_NODE_NAME, coreContainer.getHostName());
coreProps.put(CoreAdminParams.COLLECTION, syntheticCollectionName);

CoreDescriptor syntheticCoreDescriptor =
new CoreDescriptor(
syntheticCollectionName,
// todo,
Paths.get(coreContainer.getSolrHome() + "/" + syntheticCollectionName),
// Paths.get(coreContainer.getSolrHome() + "/" + todo),
coreProps,
coreContainer.getContainerProperties(),
coreContainer.getZkController());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c69deb9

Please sign in to comment.