Reputation: 1679
Lets say that I have replication on master Solr server configured like this:
<lst name="master">
<str name="enable">true</str>
<str name="replicateAfter">optimize</str>
<str name="confFiles">solrconfig.xml,schema.xml,stopwords.txt,synonyms.xml</str>
<str name="commitReserveDuration">00:00:10</str>
</lst>
and slave configured like this:
<lst name="slave">
<str name="enable">true</str>
<str name="masterUrl">masterSolr</str>
<str name="pollInterval">24:00:00</str>
</lst>
Upvotes: 0
Views: 260
Reputation: 301
the replication is a pull mechanism - so to be able to support your scenario you need to do a bit of configuration.
For you questions:
1. it does not - it pulls in intervals (or forced) from master which tells what version is ready to be replicated
2. yes - 24 hours
3. only if an optimize have been done since the last index fetch
4. some configuration and knowledge from master to slave is needed.
You can use the postOptimize update event on the updatehandler to force a repication on slaves
<listener event="postOptimize" class="solr.RunExecutableListener">
<str name="exe">wget</str>
<str name="dir">solr/bin</str>
<bool name="wait">true</bool>
<arr name="args"> <str> http://slave_host:port/solr/core?/replication?command=fetchindex</str> </arr>
</listener>
you can then remove the poll interval from the slave config. you need to add multiple args (in str tags) for each slave
Upvotes: 1