[ 
https://issues.apache.org/jira/browse/SOLR-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13634740#comment-13634740
 ] 

Erick Erickson commented on SOLR-4725:
--------------------------------------

Currently, the logic (discovery mode) is that if the name property is NOT 
present, the name defaults to the directory that contains core.properties. If 
name _is_ present, then it's used.

None of this JIRA is about whether or not to have a name attribute, it's all 
about if the name parameter is specified in two different properties files and 
is the same in both. E.g. your setup is
solrhome/core1/core.properties contains the attribute name=foo
and
solrhome/core2/core.properties contains the attribute name=foo

What's the correct thing to do?

I claim that this probably wasn't intended; there's no good way to dis-entangle 
this knot so we should fail to open either core, forcing the user to straighten 
this out b/c it certainly (IMO) is an error.

I _think_ the current behavior with the <core> tags in solr.xml is that last 
one wins, but which one is last depends on the vagaries of the XML parser, 
deterministic, but not necessarily easy to figure out.

Not quite sure what the right thing to do in terms of persisting the name if 
it's not present originally, I can see the advantage of doing that though. 
Might even happen automagically, I'd have to look back at the persist code 
again. 

Nor would I be averse to making the name attribute mandatory, although I 
haven't thought it through thoroughly. JIRA's welcome.

                
> Should we stop supporting "name" and "dataDir" in the autodiscover mode?
> ------------------------------------------------------------------------
>
>                 Key: SOLR-4725
>                 URL: https://issues.apache.org/jira/browse/SOLR-4725
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 4.3, 5.0
>            Reporter: Erick Erickson
>            Assignee: Erick Erickson
>            Priority: Blocker
>         Attachments: SOLR-4725.patch
>
>
> Making this a blocker so we resolve it. Should be quick to code if we have 
> consensus, maybe nothing at all to do here.
> I'm not too happy with the fact that the new core discovery process has two 
> real gotcha's. The individual core.properties file can define 'name' and 
> 'dataDir'. It seems too easy to either use the same name for two different 
> cores or use the same dataDir, just copy the core.properties file around and 
> fail to edit one them. In large installations this could be a bear to track 
> down.
> Straw-man proposal is the we remove support for them both in discovery mode. 
> The name defaults to the directory in which core.properties is found and the 
> data dir is immediately below there.
> Currently, there are checks to fail to load either core if either 'name' or 
> 'dataDir' is defined in more than one core. I think the error reporting is 
> weak, you probably have to look in the log file and there should be a way to 
> get this in the admin UI at least.
> Maybe the right thing to do is just leave it as-is and emphasize that 
> specifying the dataDir and name is expert level and you have to get it right, 
> but I wanted to get wider exposure to the problem before we push 4.3 out.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Reply via email to