lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From S Eslamian <seslam...@gmail.com>
Subject Re: IndexWriter.isLock()
Date Tue, 08 May 2012 04:31:21 GMT
So if my program interrupts, the lock files in the indexes will be released
in the next run. hoom?

That's so good. Thank you Mr.McCandless for your help.

On Mon, May 7, 2012 at 5:04 PM, Michael McCandless <
lucene@mikemccandless.com> wrote:

> On Mon, May 7, 2012 at 7:19 AM, S Eslamian <seslamian@gmail.com> wrote:
> > hmm... , What is a leftover lock file?
> >
> > You know I debug my code, befor index folder has lock file, till line 7.
> > Then I close the program, like in a real run an interrupt has happened.
>
> How do you close it?  Just kill the process?  That is what creates a
> leftover lock file...
>
> But with native locking, even though there is still a leftover lock
> file in the filesystem, the lock is in fact released.
>
> So then when you start up and run your test, IW.isLocked returns
> false, and as a side effect removes the leftover lock file.
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message