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

Houston Putman commented on SOLR-15209:
---------------------------------------

Currently the default placement uses the legacy implementation for 8.11 and 
9.0, this issue is about changing that.

However the legacy implementation was changed in SOLR-15803, and while the 
change is important, it is quite small. Basically for non-ReplaceNode commands, 
placement preferences are recalculated after placing replicas for each shard. 
So when you are creating a collection with 4 shards and 3 replicas, the code 
used to basically used to calculate an ordering of preferred nodes for these 
collections, then go through the 12 replicas (3 shard-1 replicas, then 3 
shard-2 replicas, etc) and, in order, place replicas on the sorted list of 
nodes. Now it will sort the nodes, place the 3 replicas for shard-1, in order, 
then re-sort the nodes, with the shard-1 replica information added, then place 
the 3 replicas for shard-2, etc. 

This is a small change but it does make a big difference in practice. It's 
certainly not perfect, and the affinity placement plugin is likely better, but 
the legacy implementation is certainly lighter weight. I think I would still 
default to using the legacy implementation given how simple it is and how it 
would certainly solve most use cases for solr users, but I could be convinced 
otherwise. 
{quote}I propose to re-package the "legacy" strategy as a 
{{PlacementPluginFactory}} so that it can be configured in the same way as 
other placement plugins.
{quote}
I do whole-heartedly support this. There should be no difference in how the 
logic between legacy and new-style placement strategies are defined. This could 
be a blocker, and would require a lot less work than changing the default 
placement plugin.

 

What are your thoughts [~ilan] ?

> Make the AffinityPlacementFactory the default placement plugin
> --------------------------------------------------------------
>
>                 Key: SOLR-15209
>                 URL: https://issues.apache.org/jira/browse/SOLR-15209
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Andrzej Bialecki
>            Assignee: Ilan Ginzburg
>            Priority: Blocker
>             Fix For: main (9.0)
>
>
> Currently there's a lot of code in {{Assign}} dealing with the fact that we 
> still support the old "legacy" replica assignment as well as the new 
> plugin-based placement strategies.
> Furthermore, the "legacy" assignment is now the default even though it's 
> neither robust nor optimal, except in the very simple and small clusters. 
> Also, providing another plugin-based placement as the default impl. runs into 
> a small complication - in the absence of any plugin config the code reverts 
> to the "legacy".
> In order to promote the adoption of the new plugin-based placements we should 
> make the {{AffinityPlacementFactory}} the new default placement strategy, 
> selected when the explicit configuration is missing (and then create it as a 
> default configuration in {{PlacementPluginFactoryLoader}}).
> I propose to re-package the "legacy" strategy as a {{PlacementPluginFactory}} 
> so that it can be configured in the same way as other placement plugins.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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

Reply via email to