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

Christine Poerschke edited comment on SOLR-11982 at 2/20/18 7:14 PM:
---------------------------------------------------------------------

Hello [~emaijala],

thanks for opening this ticket and attaching a patch with tests and solr ref 
guide documentation update.

I agree the ability to prefer certain replica types would be a nice new feature.

Question: would {{preferReplicaTypes=PULL,TLOG}} and 
{{preferReplicaTypes=TLOG,PULL}} be equivalent or would there be a difference 
i.e. the first type most preferred, the second type next preferred, and any 
other unmentioned types all equivally unpreferred?

Thanks for clarifying (in the documentation update part of the patch) the 
intended behaviour when both the existing {{preferLocalShards}} and the new 
{{preferReplicaTypes}} are specified.
{code}
+This parameter overrides `preferLocalShards=true`. Both can be defined, but 
replicas of preferred types are always selected over local shards.
{code}

{{preferReplicaTypes overrides preferLocalShards}} vs. {{preferLocalShards 
overrides preferReplicaTypes}} - what might the use cases in either scenario 
be? Or perhaps the two parameters could be mutually exclusive for less 
potential user confusion and a simpler implementation. What do you think?

Specific patch feedback from taking only a quick look: there seem to be quite a 
few whitespace change formatting changes which makes it tricky to 'see' the 
actual changes. Steps along the following lines could be one way to try and 
undo those whitespace reformats:
{code}
git checkout -b master-solr-11982 -t origin/master
git apply SOLR-11982.patch
git diff -w > temp.patch
git checkout HEAD --
git apply --ignore-whitespace temp.patch
{code}


was (Author: cpoerschke):
Hello [~emaijala],

thanks for opening this ticket and attaching a patch with tests and solr ref 
guide documentation update.

I agree the ability to prefer certain replica types would be a nice new feature.

Question: would {{preferReplicaTypes=PULL,TLOG}} and 
{{preferReplicaTypes=TLOG,PULL}} be equivalent or would there be a difference 
i.e. the first type most preferred, the second type next preferred, and any 
other unmentioned types all equivally unpreferred?

Thanks for clarifying (in the documentation update part of the patch) the 
intended behaviour when both the existing {{preferLocalShards}} and the new 
{{preferReplicaTypes}} are specified.
{code}
+This parameter overrides `preferLocalShards=true`. Both can be defined, but 
replicas of preferred types are always selected over local shards.
{code}

{{preferReplicaTypes overrides preferLocalShards}} vs. {{preferLocalShards vs. 
preferReplicaTypes}} - what might the use cases in either scenario be? Or 
perhaps the two parameters could be mutually exclusive for less potential user 
confusion and a simpler implementation. What do you think?

Specific patch feedback from taking only a quick look: there seem to be quite a 
few whitespace change formatting changes which makes it tricky to 'see' the 
actual changes. Steps along the following lines could be one way to try and 
undo those whitespace reformats:
{code}
git checkout -b master-solr-11982 -t origin/master
git apply SOLR-11982.patch
git diff -w > temp.patch
git checkout HEAD --
git apply --ignore-whitespace temp.patch
{code}

> Add support for preferReplicaTypes parameter
> --------------------------------------------
>
>                 Key: SOLR-11982
>                 URL: https://issues.apache.org/jira/browse/SOLR-11982
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: SolrCloud
>    Affects Versions: master (8.0), 7.3
>            Reporter: Ere Maijala
>            Priority: Minor
>              Labels: patch-available, patch-with-test
>         Attachments: SOLR-11982.patch
>
>
> It would be nice to have the possibility to easily prefer certain replica 
> types in a similar fashion to preferLocalShards. I'll be coming up with a 
> patch that allows one to specify e.g. preferReplicaTypes=PULL,TLOG which 
> would mean that NRT replicas wouldn't be hit with queries unless they're the 
> only ones available.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to