[
https://issues.apache.org/jira/browse/SOLR-9575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17481140#comment-17481140
]
Jan Høydahl commented on SOLR-9575:
-----------------------------------
+1 to immutable infra.
I think my PR here is a step in that direction, and simply provides a
transparent fallback to the ever-present SOLR_TIP/server/solr/ folder (which is
the one used as SOLR_HOME if SOLR_HOME is not defined).
So I don't think this change is going in a different direction than your email
from August. It provides a fallback from current SOLR_HOME to the
always-present defaults. If you later realize SOLR_VAR as a new var for
`/var/solr`, the lookup logic will just have one more place to look.
In 8.x the resolution order is
{code:java}
SOLR_HOME/solr.xml ==> (FAIL) {code}
With my PR in this issue, the resolution order becomes
{code:java}
SOLR_HOME/solr.xml ==> SOLR_TIP/server/solr/solr.xml (never fails){code}
If you add SOLR_VAR in the future it will be
{code:java}
SOLR_VAR/solr.xml ==> SOLR_HOME/solr.xml ==> SOLR_TIP/server/solr/solr.xml
(never fails) {code}
I think the fallback to the defaults in SOLR_TIP (immutable) is better than
copying in that same file to SOLR_VAR/, where it may be stuck until the next
major version, and cause problems in 10.0 if the user still does not have any
customizations to solr.xml.
> Allow starting with an empty SOLR_HOME
> --------------------------------------
>
> Key: SOLR-9575
> URL: https://issues.apache.org/jira/browse/SOLR-9575
> Project: Solr
> Issue Type: Improvement
> Reporter: David Smiley
> Assignee: Jan Høydahl
> Priority: Major
> Labels: docker
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The user may not want to use Solr's default solr-home dir location -- most
> likely to use a separate disk. If you do this, there are two main problems:
> * solr.xml & zoo.cfg aren't there
> * configsets aren't there
> Of course you could copy it manually but that's an extra step, and it's
> particularly annoying to add this step to a Docker setup. Docker is all the
> rage these days, and for good reason. If I mount a volume at
> /opt/solr/server/solr then it basically masks this part of the built-in Solr
> image (thus making configsets completely invisible) and points to some place
> that will be empty. Solr obviously complains. I could set the solr-home to
> some other path that I mount, but Solr would still complain about an empty
> solr-home -- no solr.xml
> If solr-home is empty, and if it's a dir other than the default solr-home,
> then I think the solr-home should be initialized with solr.xml and zoo.cfg
> copied from the default solr-home. I think configsets should be referenced
> from the default solr-home if there is no configsets dir in solr-home.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]