[
https://issues.apache.org/jira/browse/SOLR-13583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16874845#comment-16874845
]
Jan Høydahl commented on SOLR-13583:
------------------------------------
Thanks for working on this Andrzej. This looks potentially serious.
# create 'realcoll', index content
# create 'othercoll', index content
# create alias 'realcoll' -> 'othercoll'
# delete 'realcoll' => will delete 'othercoll'
Instead of bolting options on the commands, I wonder if we should take a step
back and re-think the whole collection/alias namespace and consider requiring
uniqueness. I realize that the lack of a true collection rename command is a
showstopper here.
There is no doubt that you want /solr/<core>/select, /solr/<core>/update etc to
resolve aliases. But I'm not so sure anymore about all the Collection API
commands like 'DELETE', 'BACKUP/RESTORE' etc. What if you say 'SPLITSHARD' with
collection='realcoll', will that resolve to 'othercoll' and you end up
splitting that one?
Is an option to simply roll back so the default for all those Collection Admin
commands require the real collection name (you can always find that name
through 'LISTALIASES')? So that means I vote for the opt-in track, where you
can say {{action=DELETE&name=realcoll&resolveAlias=true}} if you know what
you're doing, instead of first querying the alias for collection name and then
call delete on the collection.
> Impossible to delete a collection with the same name as an existing alias
> -------------------------------------------------------------------------
>
> Key: SOLR-13583
> URL: https://issues.apache.org/jira/browse/SOLR-13583
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Affects Versions: 8.1, 8.1.1
> Reporter: Andrzej Bialecki
> Assignee: Andrzej Bialecki
> Priority: Blocker
> Fix For: 8.1.2
>
>
> SOLR-13262 changed the behavior of most collection admin commands so that
> they always resolve aliases by default. In most cases this is desireable
> behavior but it also prevents executing commands on the collections that have
> the same name as an existing alias (which usually points to a different
> collection).
> This behavior also breaks the REINDEXCOLLECTION command with
> {{removeSource=true,}} which can also lead to data loss.
> This issue can be resolved by adding either an opt-in or opt-out flag to the
> collection admin commands that specifies whether the command should attempt
> resolving the provided name as an alias first. From the point of view of ease
> of use this could be an opt-out option, from the point of view of data safety
> this could be an opt-in option.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]