Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
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.
Attachments
Attachments
Issue Links
- depends upon
-
SOLR-11444 Improve Aliases.java and comma delimited collection list handling
- Closed
- is duplicated by
-
SOLR-13584 Explore prohibiting aliases and collections from having the same name.
- Resolved
- relates to
-
SOLR-11489 Create collections as _foo and auto-create an alias foo->_foo
- Open
-
SOLR-11218 Fail and return an error when attempting to delete a collection that's part of an alias
- Closed