You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Andrzej Bialecki (Jira)" <ji...@apache.org> on 2019/12/05 14:13:00 UTC

[jira] [Commented] (SOLR-11488) Do not allow collections and aliases to have the same name

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

Andrzej Bialecki commented on SOLR-11488:
-----------------------------------------

A few comments, based on the recent changes in how aliases are used in 8x:
 * indexing to a multi-collection alias should be forbidden, and at least in some cases (V1 calls) it already is (SOLR-13407). This behavior was always counter-intuitive.
 * RENAME and REINDEXCOLLECTION depend on the ability to create an alias with the same name as the original collection, and the original collection may still exist after the operation has completed - in which case the alias with the same name "overshadows" the original collection.
 * there's a flag {{followAliases }}which defaults to false for collection admin operations, in order to allow users to manage underlying collections even if they have the same name as an alias.

> Do not allow collections and aliases to have the same name
> ----------------------------------------------------------
>
>                 Key: SOLR-11488
>                 URL: https://issues.apache.org/jira/browse/SOLR-11488
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Erick Erickson
>            Priority: Major
>         Attachments: SOLR-11488.patch
>
>
> Currently you can define an alias with the same name as a collection and (perhaps) vice-versa. The more I think about this the worse idea it seems. See the discussion at the linked JIRAs.
> Proposal: We should fail to create a collection if an alias already exists with the same name and vice-versa.
> This should depend on SOLR-11444 and supersede SOLR-11218, this JIRA will include tests that define the intended behavior making SOLR-11218 obsolete. We'll close SOLR-11218 as "contained by" this JIRA.
> This _will_ take away the ability to
> 1> create a collection, call it "old" and index to it.
> 2> decide you want to change the schema
> 3> create a collection call it "new" and index to it.
> 4> create an alias old->new THIS WILL FAIL.
> 5> delete the "old" collection
> People will have to create an alias pointing to "old" and change their clients to use it, then they can do step 4 above....
> This is kind of a pain, but much better than following an alias and deleting "new". I'd also argue that it's a maintenance problem to have collections and aliases with the same name.
> What do people think? I'll try to work up a preliminary patch. If we do this, we should probably coordinate committing this and SOLR-11444 and I'll also change the docs to reflect this and upgrade notes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org