lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Kennedy <rcken...@gmail.com>
Subject adding a new slave doesn't trigger replication until the master index rebuilds
Date Tue, 22 Dec 2009 17:30:24 GMT
I'm trying to automate setting up new slave instances. I've noticed
when I use the core admin to bring a new slave core online that the
slave won't replicate the master index. The issue appears to be that
when the slave core is created, it's given a new (empty) index with a
newer timestamp than the master index timestamp. When the master
finally reindexes, only then does the slave replicate.

Short of triggering a reindex on the master, how can I get the newly
created slave core to do replication? To create the slave core, I
execute the following shell script:

curl "http://localhost:8080/solr/admin/cores?action=CREATE&name=slave0&instanceDir=solrhome/slave0&config=solrhome/slave0/conf/solrconfig.xml&schema=solrhome/slave0/conf/schema.xml&dataDir=solrhome/slave0/data"
curl "http://localhost:8080/solr/slave0/replication?command=fetchindex&masterUrl=http://localhost:8080/solr/master/replication"
curl "http://localhost:8080/solr/slave0/replication?command=enablepoll"

Ryan

Mime
View raw message