Why are my master and slave versions different?

Question:

I noted on the Solr console on the master that the version (1334049023577) is different than the version of the slave ( 1375772637624 ) right after replication. Why is there this difference ? 

Answer:

On my system, what is happening is that I have replication happening every minute. My crawler is setting itself to commit after 15 minutes. However, in the solrconfig.xml it is doing a hardcommit every 15 seconds with openSearcher=false:

<autoCommit>
<maxTime>15000</maxTime>
<openSearcher>false</openSearcher>
</autoCommit>

This is significant. Because what is happening is that the actual commit to show new results doesn't happen for 15 minutes because it's not opening a new searcher. However, it is flushing it to disk. So the index remains unchanged as you can view it on the master and by the number of documents and version. But since it is written to disk it gets replicated. So the slave actually ends up with a forward version of the index that is ahead of the master. The master has it, it just hasn't opened a new searcher for it. By changing openSearcher=true you can get it so that it is the master that is always ahead of the slave. However, you may want to play around with some of the values on how often it commits, how often it auto hard commits, whether or not you want soft commits and how often to do them, etc.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk