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

Joel Bernstein commented on SOLR-3939:
--------------------------------------

I think we need to re-open this issue.

I tried unloading the shard leader when a replica is in another Solr instance 
and the leader election didn't take place. The initial test had the shard 
leader and replica in the same Solr instance, which works with this patch.

Here is how to setup the test:

1) Start initial solr instance, automatically creating collection1 and shard1.
java -Dbootstrap_confdir=./solr/collection1/conf -Dcollection.configName=myconf 
-DzkRun -jar start.jar


2) Add shard2 to the same solr instance using coreadmin.

http://localhost:8983/solr/admin/cores?action=CREATE&name=mycore&collection=collection1&shard=shard2

3) Feed exampledocs to collection1.

4) Startup another solr instance and point to same zookeeper. This will create 
a replica for shard1 and replicate the data from shard1.

5) Unload the shard1 leader (core collection1) on the first solr instance.

http://localhost:8983/solr/admin/cores?action=UNLOAD&core=collection1

The leader election process doesn't take place. 

This would be the basic scenario for creating a micro-shard and then migrating 
it to another Solr instance.
                
> Solr Cloud recovery and leader election when unloading leader core
> ------------------------------------------------------------------
>
>                 Key: SOLR-3939
>                 URL: https://issues.apache.org/jira/browse/SOLR-3939
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 4.0-BETA, 4.0
>            Reporter: Joel Bernstein
>            Assignee: Mark Miller
>              Labels: 4.0.1_Candidate
>             Fix For: 4.1, 5.0
>
>         Attachments: SOLR-3939.patch
>
>
> When a leader core is unloaded using the core admin api, the followers in the 
> shard go into recovery but do not come out. Leader election doesn't take 
> place and the shard goes down.
> This effects the ability to move a micro-shard from one Solr instance to 
> another Solr instance.
> The problem does not occur 100% of the time but a large % of the time. 
> To setup a test, startup Solr Cloud with a single shard. Add cores to that 
> shard as replicas using core admin. Then unload the leader core using core 
> admin. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to