[
https://issues.apache.org/jira/browse/SOLR-13262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16801581#comment-16801581
]
Andrzej Bialecki commented on SOLR-13262:
------------------------------------------
After initial investigation this proved to be way much harder than expected...
up to a point where I don't think it's possible to do without major changes to
how individual SolrCore's are managed when they are a part of a SolrCloud
collection.
Just to mention a few issues I encountered:
* each SolrCore that is a part of SolrCloud collection has a strictly
formatted name, which some components parse back to recover eg. collection,
shard, replica type etc. This information is also kept in CloudDescriptor of
each SolrCore, and it's also reflected in the physical directory names where
the data is located. This means that RENAME would have to change all this
information consistently and atomically.
* which leads to the next issue: once we start renaming the cores we have
destroyed the original collection, and if there's any error in the process the
rollback will be equally convoluted, or may not be possible at all, which could
lead to data loss.
* there are also active checks in place that prevent SolrCore-s to be
disconnected from or appropriated to a different collection, which is a step we
would have to take when moving cores from old collection to the new one. Eg.
UnloadCoreOnDeleteWatcher unconditionally removes such "orphaned" cores.
This is not an exhaustive list - the more I kept digging the more complicated
it became. :)
After discussing this with [~shalinmangar] it seems a much better way forward
would be to extend the capability to use aliases, and basically always use them
- this way the lower-level SolrCore naming wouldn't have to be related to the
higher-level concept of a collection name. Existing collections would
automatically get aliases that point to the same (internal) collection name.
Solr already supports aliases for the purpose of search and index request
routing, but this support would have to be extended to include also admin APIs,
and the admin UI, including the proper representation in logs so that internal
collection names vs. external names are not confused.
I'm going to investigate how this would work.
> Implement collection RENAME command
> -----------------------------------
>
> Key: SOLR-13262
> URL: https://issues.apache.org/jira/browse/SOLR-13262
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Affects Versions: 8.0, master (9.0)
> Reporter: Andrzej Bialecki
> Priority: Major
> Fix For: 8.1, master (9.0)
>
>
> There's no RENAME collection command, which makes it unnecessarily difficult
> to manage long-term collection life-cycles.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]