You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Gurjot Singh <gu...@gmail.com> on 2009/07/15 23:04:58 UTC

Question on solr 1.4 Replication

Hi,
I am using data import handler to do full and delta import. I want to use
the replication feature of solr 1.4

For that I wanted to understand 2 scenarios

1. What happens when the slave solr server tries to poll the master at the
time delta import is running on master. Does the slave only copy those files
which have changed so far on the master index or will the slave wait for the
delta import to finish and in the next poll it will get the changes on the
master index.

2. What happens when the slave is replicating the changes in the master
index and the delta import is run at the same time on master. Will the slave
be able to get the changes when the last delta import was run.

Also I am not clear about ReplicateAfter replication configuration setting
on master. Does it mean the slave will only be able to replicate the changes
in the next poll once the commit/optimize is done on the master index.

Thanks
Gurjot

Re: Question on solr 1.4 Replication

Posted by Jeff Newburn <jn...@zappos.com>.
After each commit the index effectively locks down for replication in a way.
So if your slave grabs from the master while the master is reindexing it
will be updated to the point of last commit/optimize (depending on your
configuration).  Same is true while the slave is replicating.  So if the
slave is replicating and the master changes then the slave will continue to
replicate the version of the index it started then the next cycle it will
pull again.

The configuration is in the solrconfig.xml for the master.  It determines
the condition the slaves will replicate when the polling time is hit.  We
have it set to both optimize and commit.
                <str name="replicateAfter">commit</str>
                <str name="replicateAfter">optimize</str>



-- 
Jeff Newburn
Software Engineer, Zappos.com
jnewburn@zappos.com - 702-943-7562


> From: Gurjot Singh <gu...@gmail.com>
> Reply-To: <so...@lucene.apache.org>
> Date: Wed, 15 Jul 2009 17:04:58 -0400
> To: <so...@lucene.apache.org>
> Subject: Question on solr 1.4 Replication
> 
> Hi,
> I am using data import handler to do full and delta import. I want to use
> the replication feature of solr 1.4
> 
> For that I wanted to understand 2 scenarios
> 
> 1. What happens when the slave solr server tries to poll the master at the
> time delta import is running on master. Does the slave only copy those files
> which have changed so far on the master index or will the slave wait for the
> delta import to finish and in the next poll it will get the changes on the
> master index.
> 
> 2. What happens when the slave is replicating the changes in the master
> index and the delta import is run at the same time on master. Will the slave
> be able to get the changes when the last delta import was run.
> 
> Also I am not clear about ReplicateAfter replication configuration setting
> on master. Does it mean the slave will only be able to replicate the changes
> in the next poll once the commit/optimize is done on the master index.
> 
> Thanks
> Gurjot