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

Erick Erickson commented on SOLR-4492:
--------------------------------------

Tim:

This is old, but I'm about to get into this code a bit.

Currently, I think this _could_ be accomplished by the following steps (note, 
this is making use of the collections API, which is evolving)

1> create a collection with no replicas and a 'nodeset' where the there were 
exactly as many nodes specified in the nodeset as shards. I think this will put 
one leader on each shard.

2> use the ADDREPLICA command to, well, add replicas on specific nodes to the 
collection.

That's if you want to take total control including leader placement. If you 
don't particularly care, you could just specify the nodeset on the create 
command and let the leaders and followers fall where they may.

More later in all probability.

> Please add support for Collection API CREATE method to evenly distribute 
> leader roles among instances
> -----------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-4492
>                 URL: https://issues.apache.org/jira/browse/SOLR-4492
>             Project: Solr
>          Issue Type: New Feature
>          Components: SolrCloud
>            Reporter: Tim Vaillancourt
>            Priority: Minor
>
> Currently in SolrCloud 4.1, a CREATE call to the Collection API will cause 
> the server receiving the CREATE call to become the leader of all shards.
> I would like to ask for the ability for the CREATE call to evenly distribute 
> the leader role across all instances, ie: if I create 3 shards over 3 SOLR 
> 4.1 instances, each instance/node would only be the leader of 1 shard.
> This would be logically consistent with the way replicas are randomly 
> distributed by this same call across instances/nodes.
> Currently, this CREATE call will cause the server receiving the call to 
> become the leader of 3 shards.
> curl -v 
> 'http://<HOST>:8983/solr/admin/collections?action=CREATE&name=test&numShards=3&replicationFactor=2&maxShardsPerNode=2'
> PS: Thank you SOLR developers for your contributions!
> Tim Vaillancourt



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

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

Reply via email to