Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions changelog/unreleased/SOLR-17931_remove_hostContext.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# See https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc
title: Remove vestiges of hostContext. /solr everywhere.
type: removed # added, changed, fixed, deprecated, removed, dependency_update, security, other
authors:
- name: Eric Pugh
links:
- name: SOLR-17931
url: https://issues.apache.org/jira/browse/SOLR-17931
issues:
- 17931
7 changes: 0 additions & 7 deletions solr/core/src/java/org/apache/solr/core/SolrXmlConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -504,13 +504,6 @@ private static CloudConfig fillSolrCloudSection(NamedList<Object> nl, String def
}
String hostName = required("solrcloud", "host", removeValue(nl, "host"));

// We no longer require or support the hostContext property, but legacy users may have it, so
// remove it from the list.
String hostContext = removeValue(nl, "hostContext");
if (hostContext != null) {
log.warn("solr.xml hostContext -- hostContext is deprecated and ignored.");
}

CloudConfig.CloudConfigBuilder builder = new CloudConfig.CloudConfigBuilder(hostName, hostPort);
// set the defaultZkHost until/unless it's overridden in the "cloud section" (below)...
builder.setZkHost(defaultZkHost);
Expand Down
6 changes: 0 additions & 6 deletions solr/core/src/test/org/apache/solr/core/TestSolrXml.java
Original file line number Diff line number Diff line change
Expand Up @@ -485,12 +485,6 @@ public void testCloudConfigRequiresHost() {
assertEquals("solrcloud section missing required entry 'host'", thrown.getMessage());
}

public void testCloudConfigContinuesToWorkIfHostContextDefined() {
String solrXml =
"<solr><solrcloud><str name=\"host\">host</str><str name=\"hostContext\">legacyHostContent</str><int name=\"hostPort\">8983</int></solrcloud></solr>";
SolrXmlConfig.fromString(solrHome, solrXml);
}

public void testMultiBackupSectionError() {
String solrXml = "<solr><backup></backup><backup></backup></solr>";
SolrException thrown =
Expand Down
1 change: 0 additions & 1 deletion solr/modules/cross-dc/src/test-files/mirroring-solr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
<solrcloud>
<str name="host">${host:}</str>
<int name="hostPort">${hostPort:0}</int>
<str name="hostContext">${hostContext:solr}</str>
<bool name="genericCoreNodeNames">${genericCoreNodeNames:true}</bool>
<int name="zkClientTimeout">${zkClientTimeout:30000}</int>
<int name="distribUpdateSoTimeout">${distribUpdateSoTimeout:600000}</int>
Expand Down
2 changes: 1 addition & 1 deletion solr/server/contexts/solr-jetty-context.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_10_0.dtd">
<Configure class="org.eclipse.jetty.ee10.webapp.WebAppContext">
<Set name="contextPath"><Property name="hostContext" default="/solr"/></Set>
<Set name="contextPath">/solr</Set>
<Set name="war"><Property name="jetty.base"/>/solr-webapp/webapp</Set>
<!-- <Set name="defaultsDescriptor"><Property name="jetty.base"/>/etc/webdefault.xml</Set>-->
<Set name="extractWAR">false</Set>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@ public static void clearSolrEnableUrlUrlAllowList() throws Exception {
systemClearPropertySolrEnableUrlAllowList();
}

private static String getHostContextSuitableForServletContext() {
return "/solr";
}

protected BaseDistributedSearchTestCase() {
String solrHostContext = "/solr";
this.deadServers =
Expand Down
Loading