[
https://issues.apache.org/jira/browse/SOLR-6491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14135851#comment-14135851
]
Noble Paul commented on SOLR-6491:
----------------------------------
I'm still not convinced, why we need t mark some node is preferred or not.
A node may be preferred for sometime and after sometime it can change . The
state of the cluster can change so quickly that these "preferred" tags have no
meaning.
However it would help to have a command to just say switch leader for shardX
from node A to nodeB
What you really need is a more intelligent leader election mechanism. It can be
like this
After a new leader election happens overseer does a quick check on all the
nodes where the shard has replicas, and find out if there is a more suitable
node for that shard in the cluster. If yes, force that node to become the shard
leader. This behavior can be enabled at a collection level flag (or even by a
cluster property),if required. I would say this behavior must be default.
> Umbrella JIRA for managing the leader assignments
> -------------------------------------------------
>
> Key: SOLR-6491
> URL: https://issues.apache.org/jira/browse/SOLR-6491
> Project: Solr
> Issue Type: Improvement
> Affects Versions: 4.11, 5.0
> Reporter: Erick Erickson
> Assignee: Erick Erickson
>
> Leaders can currently get out of balance due to the sequence of how nodes are
> brought up in a cluster. For very good reasons shard leadership cannot be
> permanently assigned.
> However, it seems reasonable that a sys admin could optionally specify that a
> particular node be the _preferred_ leader for a particular collection/shard.
> During leader election, preference would be given to any node so marked when
> electing any leader.
> So the proposal here is to add another role for preferredLeader to the
> collections API, something like
> ADDROLE?role=preferredLeader&collection=collection_name&shard=shardId
> Second, it would be good to have a new collections API call like
> ELECTPREFERREDLEADERS?collection=collection_name
> (I really hate that name so far, but you see the idea). That command would
> (asynchronously?) make an attempt to transfer leadership for each shard in a
> collection to the leader labeled as the preferred leader by the new ADDROLE
> role.
> I'm going to start working on this, any suggestions welcome!
> This will subsume several other JIRAs, I'll link them momentarily.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]