Description
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.
Attachments
Issue Links
- incorporates
-
SOLR-6577 The ability to add or change arbitrary replica properties must not allow the system properties to be changed
- Closed
-
SOLR-5991 SolrCloud: Add API to move leader off a Solr instance
- Resolved
-
SOLR-4491 Please add support for manual leader election/promotion
- Closed
-
SOLR-6517 CollectionsAPI call REBALANCELEADERS
- Closed
-
SOLR-4492 Please add support for Collection API CREATE method to evenly distribute leader roles among instances
- Closed
-
SOLR-6512 Add a collections API call to add/delete arbitrary properties to a specific replica
- Closed
-
SOLR-6513 Add a collectionsAPI call BALANCESLICEUNIQUE
- Closed
-
SOLR-6527 Give preference during leader election to nodes with the preferredLeader role
- Closed
- relates to
-
SOLR-6527 Give preference during leader election to nodes with the preferredLeader role
- Closed
- supercedes
-
SOLR-5991 SolrCloud: Add API to move leader off a Solr instance
- Resolved
-
SOLR-4491 Please add support for manual leader election/promotion
- Closed
-
SOLR-4492 Please add support for Collection API CREATE method to evenly distribute leader roles among instances
- Closed