danielmeint commented on code in PR #827:
URL: https://github.com/apache/solr-operator/pull/827#discussion_r4620909242


##########
controllers/util/solr_util.go:
##########
@@ -891,6 +911,58 @@ const DefaultSolrXML = `<?xml version="1.0" 
encoding="UTF-8" ?>
 </solr>
 `
 
+// DefaultSolrXMLForSolr10 is the solr.xml template for Solr 10+.
+// It mirrors Solr 10's stock server/solr/solr.xml, so the two can be diffed 
directly. The operator only changes:
+//   - sharedLib, which is generated (first placeholder) to add custom library 
paths
+//   - backup repositories, which are generated (second placeholder)
+//
+// Compared to DefaultSolrXML (Solr 9 and earlier), it drops settings that 
Solr 10 rejects (hostContext,
+// genericCoreNodeNames) and the metrics element, which Solr 10's stock 
solr.xml doesn't contain either.
+// Solr 10 still supports the metrics element, but leaving it out means 
-DmetricsEnabled=false has no effect on Solr 10.
+// It reads the advertised host from "solr.host.advertise" instead of the 
deprecated "host" sysprop,
+// and allowPaths from its Solr 10 sysprop "solr.security.allow.paths".
+const DefaultSolrXMLForSolr10 = `<?xml version="1.0" encoding="UTF-8" ?>
+<solr>
+  <int name="maxBooleanClauses">${solr.max.booleanClauses:1024}</int>
+  %s
+  <str name="modules">${solr.modules:}</str>
+  <str name="allowPaths">${solr.security.allow.paths:}</str>
+  <str name="allowUrls">${solr.security.allow.urls:}</str>
+  <str name="hideStackTrace">${solr.hideStackTrace:false}</str>
+  <int name="indexSearcherExecutorThreads">${solr.searchThreads:0}</int>
+  <solrcloud>
+    <str name="host">${solr.host.advertise:}</str>
+    <int name="hostPort">${solr.port.advertise:0}</int>
+    <int name="zkClientTimeout">${zkClientTimeout:30000}</int>
+    <int name="distribUpdateSoTimeout">${distribUpdateSoTimeout:600000}</int>
+    <int 
name="distribUpdateConnTimeout">${distribUpdateConnTimeout:60000}</int>
+    <str 
name="zkCredentialsProvider">${zkCredentialsProvider:org.apache.solr.common.cloud.DefaultZkCredentialsProvider}</str>
+    <str 
name="zkACLProvider">${zkACLProvider:org.apache.solr.common.cloud.DefaultZkACLProvider}</str>

Review Comment:
   Fixed in 7b846ea for Solr 10+. The replacement classes exist since Solr 9.1, 
but Solr 9 keeps the existing ones so its pods don't change. The exporter keeps 
them too, as it only runs on Solr 9 and older.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to