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

Andrzej Bialecki  commented on SOLR-13583:
------------------------------------------

Sorry, it took longer than expected... the attached patch has the following 
changes:
 * it adds an optional boolean {{followAliases}} to collection-specific admin 
commands. This option defaults to false.
 * modifies collection commands to resolve aliases only when this flag is 
present and turned on (thus restoring the previous behavior, and also enabling 
admin access to the collections with names shadowed by aliases).
 * fixes a bunch of bugs where unresolved vs. resolved name was passed on to 
different stages of multi-stage commands (like create / delete / reindex 
collection).
 * adds a bunch of unit tests.

Additionally I manually verified that with this patch you can successfully 
execute the scenario from the description, and also that {{removeSource}} works 
correctly.

The patch is relative to master - the affected code is basically identical with 
regard to these changes, and it applies cleanly to branch_8x.

> 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
>
>         Attachments: SOLR-13583.patch
>
>
> 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]

Reply via email to