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

Mark Miller commented on SOLR-2752:
-----------------------------------

I've hacked out an initial rough patch for this. More tests, refactoring, 
thinking, etc to come.

Adds a new /collections/{collection}/leader_elect node.

When a core registers, it creates a new ephemeral node under 
/collections/{collection}/leader_elect/{shard}/election/

eg

/collections/{collection}/leader_elect/{shard}/election/n_0000000001

If that is the lowest n_\*, the core sets itself as the leader in 
/collections/{collection}/leader_elect/{shard}/leader
If that is not the lowest n_\*, the core puts a watch on the node before it. If 
that node goes down, the core initiates the leader election process again, 
see's if it's the lowest n, if so it's the leader, else make a new watch on the 
n_\* node before it.

Rough early exploration stuff, more to follow.

> leader-per-shard
> ----------------
>
>                 Key: SOLR-2752
>                 URL: https://issues.apache.org/jira/browse/SOLR-2752
>             Project: Solr
>          Issue Type: Sub-task
>          Components: SolrCloud
>            Reporter: Yonik Seeley
>            Assignee: Mark Miller
>             Fix For: 4.0
>
>         Attachments: SOLR-2752.patch
>
>
> We need to add metadata into zookeeper about who is the leader for each 
> shard, and have some kind of leader election.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to