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 Akshay Murarka <ak...@saavn.com> on 2018/03/14 06:56:41 UTC

Solr reload process flow

Hey,

I am using solr-5.4.0 in my production environment and am trying to automate the reload/restart process of the solr collections based on certain specific conditions.

I noticed that on solr reload the thread count increases a lot there by resulting in increased latencies. So I read about reload process and came to know that while reloading
	1) Solr creates a new core internally and then assigns this core same name as the old core. Is this correct?
	2) If above is true then does solr actually create a new index internally on reload?
	3) If so then restart sounds much better than reload, or is there any better way to upload new configs on solr?
	4) Can you point me to any docs that can give me more details about this?

Any help would be appreciated, Thank you.

Regards,
Akshay

Re: Solr reload process flow

Posted by Shawn Heisey <ap...@elyograg.org>.
On 3/14/2018 12:56 AM, Akshay Murarka wrote:
> I am using solr-5.4.0 in my production environment and am trying to automate the reload/restart process of the solr collections based on certain specific conditions.
>
> I noticed that on solr reload the thread count increases a lot there by resulting in increased latencies. So I read about reload process and came to know that while reloading
> 	1) Solr creates a new core internally and then assigns this core same name as the old core. Is this correct?
> 	2) If above is true then does solr actually create a new index internally on reload?
> 	3) If so then restart sounds much better than reload, or is there any better way to upload new configs on solr?
> 	4) Can you point me to any docs that can give me more details about this?

When you reload a core, Solr creates a new SolrCore object.  Any changes 
to the configuration are activated at that time.  This is pretty much 
exactly the same as what happens when Solr initially starts up, or when 
you create a brand new core.

After the SolrCore object is created, part of the process of starting 
the core is looking for an existing index and opening it.  Solr doesn't 
build the entire index on reload -- that's not something Solr can do.  
If it WERE something Solr could do, the amount of time required would be 
enormous in most cases. For the big indexes in my Solr install, this 
might be as long as twelve hours.

Once the new SolrCore is fully operational after the reload, it replaces 
the old SolrCore object and takes over all of its responsibilities.  The 
old object becomes garbage for Java to collect.

Thanks,
Shawn


Re: Solr reload process flow

Posted by Emir Arnautović <em...@sematext.com>.
Hi Akshay,
1. Solr creates new core with new schema/conf updates, opens a new searcher and replaces existing core if all want ok. If you have some issues with schema/conf or you ended up with corrupted index, loading core will fail but old one will stay there.
2. It is not creating new index, just creating new objects that holds configurations and open new searcher on existing index.
3. restart will load all cores. An alternative is maybe to unload core and load it instead of reloading it. It will result in core not being available for some time.
4. Not aware of some detailed documentation. i guess you already went through API doc, but just in case: https://lucene.apache.org/solr/guide/6_6/coreadmin-api.html <https://lucene.apache.org/solr/guide/6_6/coreadmin-api.html>

HTH,
Emir
--
Monitoring - Log Management - Alerting - Anomaly Detection
Solr & Elasticsearch Consulting Support Training - http://sematext.com/



> On 14 Mar 2018, at 07:56, Akshay Murarka <ak...@saavn.com> wrote:
> 
> Hey,
> 
> I am using solr-5.4.0 in my production environment and am trying to automate the reload/restart process of the solr collections based on certain specific conditions.
> 
> I noticed that on solr reload the thread count increases a lot there by resulting in increased latencies. So I read about reload process and came to know that while reloading
> 	1) Solr creates a new core internally and then assigns this core same name as the old core. Is this correct?
> 	2) If above is true then does solr actually create a new index internally on reload?
> 	3) If so then restart sounds much better than reload, or is there any better way to upload new configs on solr?
> 	4) Can you point me to any docs that can give me more details about this?
> 
> Any help would be appreciated, Thank you.
> 
> Regards,
> Akshay