[
https://issues.apache.org/jira/browse/SOLR-6338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14100453#comment-14100453
]
Primož Skale commented on SOLR-6338:
------------------------------------
I think that only one line of code needs to be changed, namely:
{code:title=ConfigSolr.java|borderStyle=solid}
107 public String getCoreRootDirectory() {
108 get(CfgProp.SOLR_COREROOTDIRECTORY,
config.getResourceLoader().getInstanceDir())
109 }
{code}
to
{code:title=ConfigSolr.java|borderStyle=solid}
107 public String getCoreRootDirectory() {
108 return SolrResourceLoader.normalizeDir(
get(CfgProp.SOLR_COREROOTDIRECTORY,
config.getResourceLoader().getInstanceDir()) );
109 }
{code}
but the test {{TestSolrXml.java}} fails in {{testPropertySub()}} and
{{testAllInfoPresent()}}.
I have a hard time deciding if this is a problem of a test or of a code. If I
hand-test it, it works (eg. it creates the core in correct location) if
coreRootDirectory property has no trailing slash in solr.xml.
> coreRootDirectory requires trailing slash, or SolrCloud cores are created in
> wrong location
> -------------------------------------------------------------------------------------------
>
> Key: SOLR-6338
> URL: https://issues.apache.org/jira/browse/SOLR-6338
> Project: Solr
> Issue Type: Bug
> Affects Versions: 4.9
> Environment: x86_64 Linux
> x86_64 Sun Java 1.7.0_51
> Reporter: Virender Khatri
> Assignee: Erick Erickson
> Labels: collection-api
> Fix For: 5.0, 4.10
>
>
> If the coreRootDirectory setting does not end with a filesystem path
> separator, cores are not created in the correct location.
> e.g.
> coreRootDirectory=/usr/local/solr/cores
> For a collection xyz, API creates '/usr/local/solr/coresxyz_shardN_replicaN'
> config directory instead of '/usr/local/solr/cores/xyz_shardN_replicaN'
> Adding a trailing slash to coreRootDirectory is a viable workaround:
> coreRootDirectory=/usr/local/solr/cores/
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]