You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2016/04/06 02:23:25 UTC

[jira] [Commented] (SOLR-8950) Provide an option to "disable" a specified Solr collection

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

Hoss Man commented on SOLR-8950:
--------------------------------

I think the conventional wisdom around this sort of thing is that you create an alias for every collection and only use alias names from external clients -- when you want to "disable" a collection (w/o actaully deleting it) you simply delete the (public) alias.  later you can add a new collection (w/ a new name) to take it's place, and re-add the old alias.

this also works very well in the specific case you mentioned of wanting to restore a collection from odler snapshots w/o ever even needing any downtime from the point of view of external clients (unles you real want to)...

* create collection named foo_internal_1
** create alias foo -> foo_internal_1
* clients use collection name foo w/o ever knowing it's an alias
* time goes on
* you decide you want to replace foo/foo_internal_1 with an older snapshot, or that you want to change the way some fields are indexed and completely rebuild
** you create a new collection named foo_internal_2
** you populate foo_internal_2 however you want
** when you are ready to make the switch for your users, you move the 'foo' alias to foo_internal_2
* eventually, you can remove foo_internal_1 completely

----

I makethis comments/suggestions not because i'm particularly opposed to adding "disable" and "enable" options to the collections API, but just to point out an alternative workflow worth considering .. and perhaps to suggest that instead of putting effort into enable/disable Collection API options, we should put effort into an "atomic rename & alias" feature to make this workflow possible for users who don't realize it's a good idea when they first create their collections ... so you can send a single command that says "rename collection foo to foo_internal and create an alias foo that points at foo_internal"

thoughts?

> Provide an option to "disable" a specified Solr collection
> ----------------------------------------------------------
>
>                 Key: SOLR-8950
>                 URL: https://issues.apache.org/jira/browse/SOLR-8950
>             Project: Solr
>          Issue Type: New Feature
>          Components: SolrCloud
>    Affects Versions: 4.10.3, trunk
>            Reporter: Hrishikesh Gadre
>
> Currently Solr does not provide facility to "disable" read/write requests for a specified collection. This is essential for certain admin operations (e.g. restore collection data from an earlier snapshot). Without this support, we need to bring down the Solr cluster during the snapshot recovery. In case of multi-tenant Solr cluster, it is not always feasible to bring down the Solr service since it can affect the availability of other collections too.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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