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

Erick Erickson commented on SOLR-4663:
--------------------------------------

bq: creating a core via API

This patch doesn't address this, at least not yet. Good point though, I'll see 
about adding that in.

bq: If someone messes with a core's configuration such that it fails on 
startup...

You always make my life more complicated <G>.... I can argue that either way, 
is this a fail-fast situation or is the robustness of driving on as well as 
possible worth the added difficulty in tracking down? The fast fix to the 
current patch would be just to remove the offending cores from the lists of 
cores (both lazily loaded and load-on-startup) and log an error.

This would imply that when someone tried to actually _do_ something with the 
offending cores, they'd get a "core not found" message, which would be slightly 
misleading, but there'd be a big fat error (not info, not warn) in the log 
files so I'm not too worried. That would avoid the complexity of checking every 
time we tried to open a core. The important bit is to fail without screwing up 
the index files for the offending cores (two cores pointing to the same 
dataDir). I expect that the current behavior for, say two cores with the same 
name is that we use one or the other, perhaps not consistently. It's Not Right 
to do anything at all IMO.

I think in the discovery case, though, the chance of copying the same 
core.properties file to multiple places, thus having cores with the same name 
or data dir is much more likely....

So do you actively object to failing fast? Or are you ok with failing fast but 
your comments are intended to make sure we're considering all the angles? 
Initially I didn't want to make things more complicated, but by just _not_ 
putting the offending cores in the relevant lists I think the complexity 
argument goes away and preserving index integrity is maintained so I'm +/-0.

Let me know...
                
> Log an error if more than one core points to the same data dir.
> ---------------------------------------------------------------
>
>                 Key: SOLR-4663
>                 URL: https://issues.apache.org/jira/browse/SOLR-4663
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 4.3, 5.0
>            Reporter: Erick Erickson
>            Assignee: Erick Erickson
>            Priority: Minor
>         Attachments: SOLR-4663.patch
>
>
> In large multi-core setups, having mistakes whereby two or more cores point 
> to the same data dir seems quite possible. We should at least complain very 
> loudly in the logs if this is detected.
> Should be a very straightforward check at core discovery time.
> Is this serious enough to keep Solr from coming up at all?

--
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