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

Yonik Seeley commented on SOLR-725:
-----------------------------------

aliases vs names... they were all "names" in my head.  No real difference as 
far as CoreContainer is concerned... it was just the "alias" command (could 
have been called addNewName, but alias was shorter)
I didn't put a lot of thought into a core being mapped to multiple names by 
CoreContainer... it just seemed natural.  If people want to dump it, I won't 
object too loudly.  I've marked the "alias" command as experimental in the wiki.

bq. An alias should not be allowed if the name already exists

Why not?  It's like an atomic rename, except you aren't removing the source.  
Seems fine to me.

bq. A rename with null is a bad usecase . We should not allow it

Agree, since it seems like it would be a user bug.

bq. An ALIAS must not rename a core. It should just add another mapping in the 
core container. The only command that should change a core's name should be SWAP

Why not?  I could see arguments either way on this one.

bq. UNALIAS command can be added . It can just remove an ALIAS if it exists . 
But it must not be able to remove the primary name (use UNLOAD to do that).

Sounds complex... why the difference?


> CoreContainer/CoreDescriptor/SolrCore cleansing
> -----------------------------------------------
>
>                 Key: SOLR-725
>                 URL: https://issues.apache.org/jira/browse/SOLR-725
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Henri Biestro
>         Attachments: solr-725.patch
>
>
> These 3 classes and the name vs alias handling are somewhat confusing.
> The recent SOLR-647 & SOLR-716 have created a bit of a flux.
> This issue attemps to clarify the model and the list of operations. 
> h3. CoreDescriptor: describes the parameters of a SolrCore
> h4. Definitions
> * has one name
>       ** The CoreDescriptor name may represent multiple aliases; in that 
> case, first alias is the SolrCore name
> * has one instance directory location
> * has one config & schema name
> h4. Operations
> The class is only a parameter passing facility
> h3. SolrCore: manages a Lucene index
> h4. Definitions
> * has one unique *name* (in the CoreContainer)
> **    the *name* is used in JMX to identify the core
> * has one current set of *aliases*
> **    the name is the first alias
> h4. Name & alias operations
> *     *get name/aliases*: obvious
> *     *alias*: adds an alias to this SolrCore
> *     *unalias*: removes an alias from this SolrCore
> *     *name*: sets the SolrCore name
> **            potentially impacts JMX registration
> *     *rename*: picks a new name from the SolrCore aliases
> **            triggered when alias name is already in use
> h3. CoreContainer: manages all relations between cores & descriptors
> h4. Definitions
> * has a set of aliases (each of them pointing to one core)
> **    ensure alias uniqueness.
> h4. SolrCore instance operations
> *     *load*: makes a SolrCore available for requests
> **            creates a SolrCore
> **            registers all SolrCore aliases in the aliases set
> **            (load = create + register)
> *     *unload*: removes a core idenitified by one of its aliases
> **            stops handling the Lucene index
> **            all SolrCore aliases are removed
> *     *reload*: recreate the core identified by one of its aliases
> *     *create*: create a core from a CoreDescriptor
> **            readies up the Lucene index
> *     *register*: registers all aliases of a SolrCore
>                       
> h4. SolrCore  alias operations
> *     *swap*: swaps 2 aliases
> **            method: swap
> *     *alias*: creates 1 alias for a core, potentially unaliasing a 
> previously used alias
> **            The SolrCore name being an alias, this operation might trigger 
> a SolrCore rename
> *     *unalias*: removes 1 alias for a core
> **            The SolrCore name being an alias, this operation might trigger 
> a SolrCore rename
>                       

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to