Indeed I don't think there is any restriction on placing replicas of
different shards of a collection on the same node (no access to the code
right now to check).

If all nodes are empty before placement, all have enough free disk space,
total number of replicas (number of shards times replication factor) is
smaller than or equal to number of nodes, and the distribution of nodes to
AZ is compatible with distributing the replicas evenly, I wouldn't expect
two replicas to end on the same node.

Ilan

On Sat, Aug 5, 2023, 4:51 PM Jan Høydahl <jan....@cominvent.com> wrote:

> Hi,
>
> I do not see this being a factor in the Ref Guide either
> https://solr.apache.org/guide/solr/latest/configuration-guide/replica-placement-plugins.html#affinityplacementfactory
>
> Can you give an example of how the distribution? Were there other
> candidate nodes that had fewer or same number of cores that would be a more
> natural fit for selection?
>
> Jan
>
> > 26. jul. 2023 kl. 19:23 skrev Jing Tie <tiej...@gmail.com>:
> >
> > Hello,
> >
> > We just migrated to Solr 9.2 and started using
> > AffinityPlacementPlugin. In a sharded environment, we made sure there
> > is enough storage on each node and enough nodes in each AZ, but it is
> > interesting that shard1 and shard2 of the same collection were
> > distributed on the same node. In Solr 8, it is by default not allowing
> > 2 shards of the same collection on the same node.
> >
> > We looked into the PlacementPlugins code, and didn't see any
> > restrictions against that. Does anyone have the same issue? Do you
> > have any suggestions?
> >
> > Thank you very much,
> > Jing
>
>

Reply via email to