You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "David Smiley (Jira)" <ji...@apache.org> on 2024/05/13 23:22:00 UTC

[jira] [Created] (SOLR-17288) automatic preferredLeader

David Smiley created SOLR-17288:
-----------------------------------

             Summary: automatic preferredLeader
                 Key: SOLR-17288
                 URL: https://issues.apache.org/jira/browse/SOLR-17288
             Project: Solr
          Issue Type: Improvement
      Security Level: Public (Default Security Level. Issues are Public)
          Components: SolrCloud
            Reporter: David Smiley


I'd like to have the preferredLeader replica property be assigned automatically by Solr (if configured to).

I propose that a [ReplicaPlacement|https://github.com/apache/solr/blob/branch_9_6/solr/core/src/java/org/apache/solr/cluster/placement/ReplicaPlacement.java#L35] decision, computed by a PlacementPlugin, include a "preferredLeader" boolean.  Alternatively, we could alter PlacementPlugin.computePlacements method contract to further state that the returned order is significant -- that replicas are created in iteration order.  Furthermore, the consumer (in Assign) would mark the first replica as preferredLeader.

A default algorithm could simply choose a preferredLeader at random.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org