lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: gracefully interrupting an optimize
Date Fri, 21 Jan 2011 14:13:31 GMT
If you call optimize(false), that'll return immediately but run the
optimize "in the background" (assuming you are using the default
ConcurrentMergeScheduler).

Later, when it's time to stop optimizing, call IW.close(false), which
will abort any running merges yet keep any merges that had finished
(so some work, but not necessarily all work, is lost); it should
return quickly.

Mike

On Fri, Jan 21, 2011 at 8:28 AM,  <v.sevel@lombardodier.com> wrote:
> Hi,
>
> Each night I optimize an index that contains 35 millions docs. Its takes
> about 1.5 hours. For maintenance reasons, it may happen that the machine
> gets rebooted. In that case, server gets a chance to gracefully shutdown,
> but eventually, the reboot script will kill the processes that did not
> stop in time. My preference would to stop gracefully the optimize rather
> than getting the process killed. Is there a way to do that?
>
> Thanks,
>
> Vincent
>
> ************************ DISCLAIMER ************************
> This message is intended only for use by the person to
> whom it is addressed. It may contain information that is
> privileged and confidential. Its content does not
> constitute a formal commitment by Lombard Odier
> Darier Hentsch & Cie or any of its branches or affiliates.
> If you are not the intended recipient of this message,
> kindly notify the sender immediately and destroy this
> message. Thank You.
> *****************************************************************
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message