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

Ramkumar Aiyengar commented on SOLR-5209:
-----------------------------------------

FWIW, newer API actually won't allow you to do exactly what this does. The 
shard delete API (sensibly) explicitly checks if we have a null range or if we 
are not an active shard. This potentially lops out an active shard with an 
assigned range leaving the cluster state broken. I actually don't know if 
there's a way to get the cluster state back to a sensible state without 
modifying it by hand or recreating it altogether by nuking ZK state -- when we 
tried bringing up the replica after this, it got assigned to a shard with an 
empty range..

I guess if we plan to get to the ZK truth mode sometime soon, its fine to drop 
this patch. We mainly meant for this as an interim step to ensure someone 
doesn't accidentally burn their fingers..


> cores/action=UNLOAD of last replica removes shard from clusterstate
> -------------------------------------------------------------------
>
>                 Key: SOLR-5209
>                 URL: https://issues.apache.org/jira/browse/SOLR-5209
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 4.4
>            Reporter: Christine Poerschke
>            Assignee: Mark Miller
>         Attachments: SOLR-5209.patch
>
>
> The problem we saw was that unloading of an only replica of a shard deleted 
> that shard's info from the clusterstate. Once it was gone then there was no 
> easy way to re-create the shard (other than dropping and re-creating the 
> whole collection's state).
> This seems like a bug?
> Overseer.java around line 600 has a comment and commented out code:
> // TODO TODO TODO!!! if there are no replicas left for the slice, and the 
> slice has no hash range, remove it
> // if (newReplicas.size() == 0 && slice.getRange() == null) {
> // if there are no replicas left for the slice remove it



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

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

Reply via email to