Re: Solr 7.1 Solrcloud dynamic/automatic replicas

2017-12-20 Thread Erick Erickson
If you specify the node parameter for ADDREPLICA I don't think so, but as you know you have to understand the topology via CLUSTERSTATUS or some such. If you don't specify the "node" parameter, I think if you take a look at the "Rule-based Replica Placement" here: https://lucene.apache.org/solr/gu

Re: Solr 7.1 Solrcloud dynamic/automatic replicas

2017-12-20 Thread Greg Roodt
Thanks again Erick. It looks like I've got this working. One final question I think: Is there a way to prevent ADDREPLICA from adding another core if a core for the collection already exists on the node? I've noticed that if I call ADDREPLICA twice for the same IP:PORT_solr, I get multiple cores.

Re: Solr 7.1 Solrcloud dynamic/automatic replicas

2017-12-20 Thread Erick Erickson
The internal method is ZkController.generateNodeName(), although it's fairly simple, there are bunches of samples in ZkControllerTest But yeah, it requires that you know your hostname and port, and the context is "solr". On Tue, Dec 19, 2017 at 8:04 PM, Greg Roodt wrote: > Ok, thanks. I'

Re: Solr 7.1 Solrcloud dynamic/automatic replicas

2017-12-19 Thread Greg Roodt
Ok, thanks. I'll take a look into using the ADDREPLICA API. I've found a few examples of the znode format. It seems to be IP:PORT_solr (where I presume _solr is the name of the context or something?). Is there a way to discover what a znode is? i.e. Can my new node determine what it's znode is? O

Re: Solr 7.1 Solrcloud dynamic/automatic replicas

2017-12-19 Thread Erick Erickson
Yes, ADDREPLICA is mostly equivalent, it's also supported going forward LegacyCloud should work temporarily, I'd change it going forward though. Finally, you'll want to add a "node" parameter to insure your replica is placed on the exact node you want, see the livenodes znode for the format..

Re: Solr 7.1 Solrcloud dynamic/automatic replicas

2017-12-19 Thread Greg Roodt
Thanks for the reply. So it sounds like the method that I'm using to automatically add replicas on Solr 6.2 is not recommended and not going to be supported in future versions. A couple of follow up questions then: * Do you know if running with legacyCloud=true will make this behaviour work "for n

Re: Solr 7.1 Solrcloud dynamic/automatic replicas

2017-12-19 Thread Shawn Heisey
On 12/19/2017 3:06 PM, Greg Roodt wrote: > Thanks for your reply Erick. > > This is what I'm doing at the moment with Solr 6.2 (I was mistaken, before > I said 6.1). > > 1. A new instance comes online > 2. Systemd starts solr with a custom start.sh script > 3. This script creates a core.properties

Re: Solr 7.1 Solrcloud dynamic/automatic replicas

2017-12-19 Thread Greg Roodt
Thanks for your reply Erick. This is what I'm doing at the moment with Solr 6.2 (I was mistaken, before I said 6.1). 1. A new instance comes online 2. Systemd starts solr with a custom start.sh script 3. This script creates a core.properties file that looks like this: ``` name=blah shard=shard1 `

Re: Solr 7.1 Solrcloud dynamic/automatic replicas

2017-12-18 Thread Erick Erickson
What have you configured to add the replica when a new node is spun up? If you're just copying the entire directory including the core.properties file, you're just getting lucky. The legcyCloud=true default is _probably_ adding the replica with a new URL and thus making it distinct. Please detail