dsmiley commented on code in PR #5384:
URL: https://github.com/apache/solr/pull/5384#discussion_r4701619162
##########
solr/solr-ref-guide/modules/configuration-guide/pages/configuring-solr-xml.adoc:
##########
Review Comment:
This page also documents `configSetBaseDir`:
----
`configSetBaseDir`::
+
[%autowidth,frame=none]
|===
|Optional |Default: `$SOLR_HOME/configsets`
|===
+
The directory under which configsets for Solr cores can be found.
----
It's odd that it's not next to `configSetService`. Also odd that it makes
no mention of SolrCloud. It should be moved and the docs updated to say that
it's only relevant for FileSystemConfigSetService.
##########
solr/core/src/java/org/apache/solr/core/ConfigSetService.java:
##########
@@ -113,8 +114,17 @@ private static ConfigSetService instantiate(CoreContainer
coreContainer) {
}
}
- private void bootstrapConfigSet(CoreContainer coreContainer) {
- // bootstrap _default conf and solr.configset.bootstrap.confdir if
provided via system property
+ /**
+ * Called once at startup in SolrCloud mode. Does nothing by default; an
implementation may call
+ * {@link #bootstrapDefaultConfigSets()}.
+ */
+ protected void bootstrapConfigSet(CoreContainer coreContainer) {}
Review Comment:
The point is to allow an implementation to choose what to do on this matter.
For example, the FileSystem one should do nothing as configSetBaseDir ought to
be pointed to whatever the operator wants. But there's no fixed rule here...
maybe a business wants the typical ZK default but prefers to disable `_default`.
I think I now want to decouple this from the implementation further, and
ensure that configuration can easily enable/disable the bootstrapping.
##########
solr/solr-ref-guide/modules/configuration-guide/pages/config-sets.adoc:
##########
@@ -26,10 +26,21 @@ These example configsets are named `_default` and
`sample_techproducts_configs`.
== Configsets in SolrCloud Clusters
-In SolrCloud, it's critical to understand that configsets are stored in
ZooKeeper _and not_ in the file system.
+In SolrCloud, it's critical to understand that by default, configsets are
stored in ZooKeeper _and not_ in the file system.
Solr's `_default` configset is uploaded to ZooKeeper on initialization.
This and a couple of example configsets remain on the file system but Solr
does not use them unless they are used with a new collection.
+Operators can configure a different backing implementation, such as
`FileSystemConfigSetService`, via `configSetService` in `solr.xml`.
+See xref:configuring-solr-xml.adoc#configsetservice[`configSetService`].
+The file system choice is desirable for custom docker image deployments that
package plugins & configsets together as a read-only tested unit.
+It's inherently more secure and it simplifies upgrade scenarios since custom
plugins will only ever read configuration it shipped and was tested with.
+The file system option is simple; it will try to write to the
`configSetBaseDir` if an upload or other mutable command is given, subject to
OS level permissions.
+It does _not_ replicate to other nodes.
+In Solr's Docker image, `configSetBaseDir` defaults to
`/var/solr/data/configsets`, which is writable.
+For a read-only setup, point `configSetBaseDir` at a directory in the Solr
installation (e.g. `/opt/solr/server/solr/configsets`), where uploads then fail.
+See xref:deployment-guide:solr-in-docker.adoc[].
+The rest of this section describes the default ZooKeeper-backed behavior.
Review Comment:
good idea; I'll move it down to an advanced section.
--
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]