This is an automated email from the ASF dual-hosted git repository.

epugh pushed a commit to branch branch_10_0
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_10_0 by this push:
     new ff1afa74c5f SOLR-17931: remove hostContext vestiges (#3815)
ff1afa74c5f is described below

commit ff1afa74c5f9aa577b02c82f72139c1afce9c685
Author: Eric Pugh <[email protected]>
AuthorDate: Sat Nov 15 10:05:16 2025 -0500

    SOLR-17931: remove hostContext vestiges (#3815)
---
 changelog/unreleased/SOLR-17931_remove_hostContext.yml         | 10 ++++++++++
 solr/core/src/java/org/apache/solr/core/SolrXmlConfig.java     |  7 -------
 solr/core/src/test/org/apache/solr/core/TestSolrXml.java       |  6 ------
 solr/modules/cross-dc/src/test-files/mirroring-solr.xml        |  1 -
 solr/server/contexts/solr-jetty-context.xml                    |  2 +-
 .../java/org/apache/solr/BaseDistributedSearchTestCase.java    |  4 ----
 6 files changed, 11 insertions(+), 19 deletions(-)

diff --git a/changelog/unreleased/SOLR-17931_remove_hostContext.yml 
b/changelog/unreleased/SOLR-17931_remove_hostContext.yml
new file mode 100644
index 00000000000..6db36f648a8
--- /dev/null
+++ b/changelog/unreleased/SOLR-17931_remove_hostContext.yml
@@ -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
diff --git a/solr/core/src/java/org/apache/solr/core/SolrXmlConfig.java 
b/solr/core/src/java/org/apache/solr/core/SolrXmlConfig.java
index 37bdceea9f1..53d301b7ce5 100644
--- a/solr/core/src/java/org/apache/solr/core/SolrXmlConfig.java
+++ b/solr/core/src/java/org/apache/solr/core/SolrXmlConfig.java
@@ -505,13 +505,6 @@ public class SolrXmlConfig {
     }
     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);
diff --git a/solr/core/src/test/org/apache/solr/core/TestSolrXml.java 
b/solr/core/src/test/org/apache/solr/core/TestSolrXml.java
index 6090361e420..daf30defc82 100644
--- a/solr/core/src/test/org/apache/solr/core/TestSolrXml.java
+++ b/solr/core/src/test/org/apache/solr/core/TestSolrXml.java
@@ -486,12 +486,6 @@ public class TestSolrXml extends SolrTestCaseJ4 {
     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 =
diff --git a/solr/modules/cross-dc/src/test-files/mirroring-solr.xml 
b/solr/modules/cross-dc/src/test-files/mirroring-solr.xml
index d5a8630b56f..b410bb698e1 100644
--- a/solr/modules/cross-dc/src/test-files/mirroring-solr.xml
+++ b/solr/modules/cross-dc/src/test-files/mirroring-solr.xml
@@ -21,7 +21,6 @@
     <solrcloud>
         <str name="host">${solr.host.advertise:}</str>
         <int name="hostPort">${solr.port.advertise: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>
diff --git a/solr/server/contexts/solr-jetty-context.xml 
b/solr/server/contexts/solr-jetty-context.xml
index 979377932b0..6e801f77aaf 100644
--- a/solr/server/contexts/solr-jetty-context.xml
+++ b/solr/server/contexts/solr-jetty-context.xml
@@ -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>
diff --git 
a/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
 
b/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
index da8d2379c82..2ae2398d98b 100644
--- 
a/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
+++ 
b/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
@@ -133,10 +133,6 @@ public abstract class BaseDistributedSearchTestCase 
extends SolrTestCaseJ4 {
     systemClearPropertySolrEnableUrlAllowList();
   }
 
-  private static String getHostContextSuitableForServletContext() {
-    return "/solr";
-  }
-
   protected BaseDistributedSearchTestCase() {
     String solrHostContext = "/solr";
     this.deadServers =

Reply via email to