Replication on Slave startup (Solr 1.4)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Replication on Slave startup (Solr 1.4)

Jordan Mendler
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 *<a href="http://localhost:solr_port">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
Reply | Threaded
Open this post in threaded view
|

Re: Replication on Slave startup (Solr 1.4)

Mark Miller-3
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 *<a href="http://localhost:solr_port">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



Reply | Threaded
Open this post in threaded view
|

Re: Replication on Slave startup (Solr 1.4)

Yonik Seeley-2-2
On Sun, Jul 12, 2009 at 11:10 PM, Mark Miller<[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: Replication on Slave startup (Solr 1.4)

Noble Paul നോബിള്‍  नोब्ळ्-2
I guess initialDelay can be set to 0. that should solve this ..

On Mon, Jul 13, 2009 at 9:16 AM, Yonik Seeley<[hidden email]> wrote:
> On Sun, Jul 12, 2009 at 11:10 PM, Mark Miller<[hidden email]> 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