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 Per Steffensen <pe...@gmail.com> on 2016/05/18 07:55:33 UTC

Commit (hard) at shutdown?

Hi

Solr 5.1.
Someone in production in my organization claims that even though Solrs 
are shut down gracefully, there can be huge tlogs to replay when 
starting Solrs again. We are doing heavy indexing right up until Solrs 
are shut down, and we have <autoCommit> set to 1 min. Can anyone confirm 
(or the opposite) that Solrs, upon graceful shutdown, OUGHT TO do a 
(hard) commit, leaving tlogs empty (= nothing to replay when starting 
again)?

Regards, Per Steffensen

Re: Commit (hard) at shutdown?

Posted by Per Steffensen <pe...@gmail.com>.
Sorry, I did not see the responses here because I found out myself. I 
definitely seems like a hard commit it performed when shutting down 
gracefully. The info I got from production was wrong.
It is not necessarily obvious that you will loose data on "kill -9". The 
tlog ought to save you, but it probably not 100% bulletproof.
We are not using the bin/solr script (yet)

On 21/05/16 04:02, Shawn Heisey wrote:
> On 5/20/2016 2:51 PM, Jon Drews wrote:
>> I would be interested in an answer to this question.
>>
>>  From my research it looks like it will do a hard commit if cleanly shut
>> down. However if you "kill -9" it you'll loose data (obviously). Perhaps
>> production isn't cleanly shutting down solr?
>> https://dzone.com/articles/understanding-solr-soft
> I do not know whether a graceful shutdown does a hard commit or not.
>
> I do know that all versions of Solr that utilize the bin/solr script are
> configured by default to forcibly kill Solr only five seconds after the
> graceful shutdown is requested.  Five seconds is usually not enough time
> for production installs, so it needs to be increased.  The only way to
> do this currently is to edit the bin/solr script directly.
>
> Thanks,
> Shawn
>
>


Re: Commit (hard) at shutdown?

Posted by Shawn Heisey <ap...@elyograg.org>.
On 5/20/2016 2:51 PM, Jon Drews wrote:
> I would be interested in an answer to this question.
>
> From my research it looks like it will do a hard commit if cleanly shut
> down. However if you "kill -9" it you'll loose data (obviously). Perhaps
> production isn't cleanly shutting down solr?
> https://dzone.com/articles/understanding-solr-soft

I do not know whether a graceful shutdown does a hard commit or not.

I do know that all versions of Solr that utilize the bin/solr script are
configured by default to forcibly kill Solr only five seconds after the
graceful shutdown is requested.  Five seconds is usually not enough time
for production installs, so it needs to be increased.  The only way to
do this currently is to edit the bin/solr script directly.

Thanks,
Shawn


Re: Commit (hard) at shutdown?

Posted by Jon Drews <jo...@jondrews.com>.
I would be interested in an answer to this question.

From my research it looks like it will do a hard commit if cleanly shut
down. However if you "kill -9" it you'll loose data (obviously). Perhaps
production isn't cleanly shutting down solr?
https://dzone.com/articles/understanding-solr-soft

Jon Drews
jondrews.com

On Wed, May 18, 2016 at 3:55 AM, Per Steffensen <pe...@gmail.com> wrote:

> Hi
>
> Solr 5.1.
> Someone in production in my organization claims that even though Solrs are
> shut down gracefully, there can be huge tlogs to replay when starting Solrs
> again. We are doing heavy indexing right up until Solrs are shut down, and
> we have <autoCommit> set to 1 min. Can anyone confirm (or the opposite)
> that Solrs, upon graceful shutdown, OUGHT TO do a (hard) commit, leaving
> tlogs empty (= nothing to replay when starting again)?
>
> Regards, Per Steffensen
>