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 Jordan Mendler <jm...@ucla.edu> on 2009/07/12 23:48:53 UTC

Replication on Slave startup (Solr 1.4)

Hi all,

I am having an issue where Solr slaves do not pull replication data on
startup. Rather they wait until the amount of time of poll_interval, before
pulling the initial index. This is causing new and rebooted nodes to have a
stale index for polling_interval seconds, in addition to the amount of time
it takes to pull the data.

Is there some native setting to make slaves pull on startup? A hack could be
to add a curl *http://localhost:solr_port
/solr/replication?command=fetchindex* to my Solr startup script, but this
does not seem like a clean way to do it.

Furthermore, has anyone tried to 'warm' nodes after provisioning before
bringing them into a production read cluster? I would be curious what
procedure you are using to pull and warm the new index from the mastern
before exposing newly provisioned slaves to your production load balancer.

Thanks so much,
Jordan

Re: Replication on Slave startup (Solr 1.4)

Posted by Noble Paul നോബിള്‍ नोब्ळ् <no...@corp.aol.com>.
I guess initialDelay can be set to 0. that should solve this ..

On Mon, Jul 13, 2009 at 9:16 AM, Yonik Seeley<yo...@lucidimagination.com> wrote:
> On Sun, Jul 12, 2009 at 11:10 PM, Mark Miller<ma...@gmail.com> wrote:
>> I wonder if using a 0 initialDelay would make more sense?
>
> Hmmm, that raises the question of when an initialDelay > 0 does make
> sense... what's the use case?
>
> -Yonik
> http://www.lucidimagination.com
>



-- 
-----------------------------------------------------
Noble Paul | Principal Engineer| AOL | http://aol.com

Re: Replication on Slave startup (Solr 1.4)

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Sun, Jul 12, 2009 at 11:10 PM, Mark Miller<ma...@gmail.com> wrote:
> I wonder if using a 0 initialDelay would make more sense?

Hmmm, that raises the question of when an initialDelay > 0 does make
sense... what's the use case?

-Yonik
http://www.lucidimagination.com

Re: Replication on Slave startup (Solr 1.4)

Posted by Mark Miller <ma...@gmail.com>.
Jordan Mendler wrote:
> Hi all,
>
> I am having an issue where Solr slaves do not pull replication data on
> startup. Rather they wait until the amount of time of poll_interval, before
> pulling the initial index. This is causing new and rebooted nodes to have a
> stale index for polling_interval seconds, in addition to the amount of time
> it takes to pull the data.
>
> Is there some native setting to make slaves pull on startup? A hack could be
> to add a curl *http://localhost:solr_port
> /solr/replication?command=fetchindex* to my Solr startup script, but this
> does not seem like a clean way to do it.
>
> Furthermore, has anyone tried to 'warm' nodes after provisioning before
> bringing them into a production read cluster? I would be curious what
> procedure you are using to pull and warm the new index from the mastern
> before exposing newly provisioned slaves to your production load balancer.
>
> Thanks so much,
> Jordan
>
>   
Its because the index is just marked as changed on startup - the slaves won't know until they poll, and currently, polling is kicked
off with executorService.scheduleAtFixedRate(task, pollInterval, pollInterval, TimeUnit.MILLISECONDS);

I wonder if using a 0 initialDelay would make more sense?

-- 
- Mark

http://www.lucidimagination.com