[ 
https://issues.apache.org/jira/browse/SOLR-11508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marc Morissette updated SOLR-11508:
-----------------------------------
    Description: 
(Heavily edited)

Since Solr 7, it is possible to store Solr cores in separate disk locations 
using solr.data.home (see SOLR-6671). This is very useful when running Solr in 
Docker where data must be stored in a directory which is independent from the 
rest of the container.

While this works well in standalone mode, it doesn't in Cloud mode as the 
core.properties automatically created by Solr are still stored in 
coreRootDirectory and cores created that way disappear when the Solr Docker 
container is redeployed.

The solution is to configure coreRootDirectory to an empty directory that can 
be mounted outside the Docker container.

The incoming patch makes this easier to do by allowing coreRootDirectory to be 
configured via a solr.core.home system property and SOLR_CORE_HOME environment 
variable.

  was:
Since Solr 7, it is possible to store Solr cores in separate disk locations 
using solr.data.home (see SOLR-6671). This is very useful where running Solr in 
Docker where data must be stored in a directory which is independent from the 
rest of the container.

Unfortunately, while core data is stored in 
{{$\{solr.data.home}/$\{core.name}/index/...}}, core.properties is stored in 
{{$\{solr.solr.home}/$\{core.name}/core.properties}}.

Reading SOLR-6671 comments, I think this was the expected behaviour but I don't 
think it is the correct one.

In addition to being inelegant and counterintuitive, this has the drawback of 
stripping a core of its metadata and breaking core discovery when a Solr 
installation is redeployed, whether in Docker or not.

core.properties is mostly metadata and although it contains some configuration, 
this configuration is specific to the core it accompanies. I believe it should 
be stored in solr.data.home, with the rest of the data it describes.

        Summary: Make coreRootDirectory configurable via an environment 
variable (SOLR_CORE_HOME)  (was: core.properties should be stored 
$solr.data.home/$core.name)

> Make coreRootDirectory configurable via an environment variable 
> (SOLR_CORE_HOME)
> --------------------------------------------------------------------------------
>
>                 Key: SOLR-11508
>                 URL: https://issues.apache.org/jira/browse/SOLR-11508
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Marc Morissette
>
> (Heavily edited)
> Since Solr 7, it is possible to store Solr cores in separate disk locations 
> using solr.data.home (see SOLR-6671). This is very useful when running Solr 
> in Docker where data must be stored in a directory which is independent from 
> the rest of the container.
> While this works well in standalone mode, it doesn't in Cloud mode as the 
> core.properties automatically created by Solr are still stored in 
> coreRootDirectory and cores created that way disappear when the Solr Docker 
> container is redeployed.
> The solution is to configure coreRootDirectory to an empty directory that can 
> be mounted outside the Docker container.
> The incoming patch makes this easier to do by allowing coreRootDirectory to 
> be configured via a solr.core.home system property and SOLR_CORE_HOME 
> environment variable.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to