Details
-
New Feature
-
Status: Resolved
-
Minor
-
Resolution: Duplicate
-
None
-
None
-
None
-
None
Description
Creating this ticket as both similar to and different from the SOLR-6730 select?replicaAffinity=(node|host) and replicaAffinity.hostPriorities support ticket.
copy/paste-ing a potential approach from the https://issues.apache.org/jira/browse/SOLR-6730?focusedCommentId=15583110&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15583110 update:
- Two numeric parameters ('seed' and 'mod') are optionally added to each request.
- The two parameters 'place' the requests within the cloud, e.g. for mod=9 any seed between 0 and 8 would be valid and seed=6 would 'place' the request with the 7th of 9 replicas, or more realistically the 3rd of 3 replicas.
- seed-plus-mod placement automatically adjusts when the number of replicas changes i.e. (seed=2,mod=6) would be 3rd-of-6 or 2nd-of-4 or 2nd-of-3 or 1st-of-2 placement.
selected code areas of interest:
- The HttpShardHandler's prepDistributed method calls the HttpShardHandlerFactory's getReplicaListTransformer method.
- https://github.com/apache/lucene-solr/blob/releases/lucene-solr/7.7.0/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandler.java#L294
- https://github.com/apache/lucene-solr/blob/releases/lucene-solr/7.7.0/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java#L438-L484
- The simplest replica list transformer is a shuffling one. Additionally and optionally node preference rules may be applied.
Attachments
Issue Links
- duplicates
-
SOLR-13257 Enable replica routing affinity for better cache usage
- Closed
- is related to
-
SOLR-6730 select?replicaAffinity=(node|host) and replicaAffinity.hostPriorities support
- Resolved