Hi Ilan, yes, the system property remains the same (`node_type`). I've uploaded a small proof of concept here https://gist.github.com/ixai/39c450ce81ffeeb5776b5c6e93522fd8. It contains one docker-compose file with 3 nodes, and a script to configure and generate the collections.
Best, Ixai On Thu, Jun 16, 2022 at 6:39 PM Ilan Ginzburg <ilans...@gmail.com> wrote: > Thanks a lot Ixai for the debugging work and PR (that looks good to me - > I'll merge it shortly). > > As I understand you managed to make this work end to end, can you please > confirm that the per node system property to use (to match the " > collectionNodeType" config) is indeed node_type? > > Thanks, > Ilan > > On Thu, Jun 16, 2022 at 6:59 AM Ixai Lanzagorta < > ixai.lanzago...@rondhuit.com> wrote: > > > I had some time to check this today and it's a documentation snafu. The > > correct key name is `collectionNodeType`. > > > > - https://issues.apache.org/jira/browse/SOLR-16256 > > - https://github.com/apache/solr/pull/908 > > > > On Mon, Jun 13, 2022 at 6:58 PM Ixai Lanzagorta < > > ixai.lanzago...@rondhuit.com> wrote: > > > > > Hi, > > > > > > I'm trying the new Solr 9.x replication plugin, and I'm running into an > > > issue with the `nodeType` constraints. > > > In summary, I created a docker-compose file that has: > > > > > > - a zookeeper node > > > - two "alpha" Solr nodes (`-Dnode_type=alphaNode`) > > > - two "beta" Solr nodes (`-Dnode_type=betaNode`) > > > - one overseer Solr node > > (`-Dsolr.node.roles=data:off,overseer:preferred`, > > > exposes localhost:8983) > > > > > > Given a clean environment, I push the following plugin configuration: > > > > > > ```sh > > > http -j post :8983/api/cluster/plugin <<<' > > > { > > > "add": { > > > "name": ".placement-plugin", > > > "class": > > > "org.apache.solr.cluster.placement.plugins.AffinityPlacementFactory", > > > "config": { > > > "withCollection": { > > > "placeWithAlpha": "placeInAlpha", > > > "placeWithAlphaOrBeta": "placeInAlphaOrBeta" > > > }, > > > "nodeType": { > > > "placeInAlpha": "alphaNode", > > > "placeInAlphaOrBeta": "alphaNode,betaNode" > > > } > > > } > > > } > > > } > > > ' > > > ``` > > > > > > I then proceed to create a new collection > > > > > > ```sh > > > http -j post :8983/api/collections <<<' > > > { > > > "create": { > > > "name": "placeInAlpha", > > > "numShards": 1, > > > "replicationFactor": 1 > > > } > > > } > > > ' > > > ``` > > > > > > I would expect this collection to be placed exclusively in a node with > > > `node_type=alphaNode`. However, it's sometimes placed > > > in nodes with `node_type=betaNode`. I deleted it and recreated it > several > > > times to verify, and I got a seemingly random placement. > > > > > > I wonder if my understanding of the documentation is wrong, or if > there's > > > something I'm missing from my configuration? > > > Any help is appreciated. I'll continue playing with this and update the > > > thread if I find any additional information. > > > > > > Best, > > > Ixai > > > > > > P.S.: Before adding the `nodeType` constraint, I was successfully > placing > > > replicas with only the `withCollection` constraint. > > > > > > > > >