Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EDE38998C for ; Tue, 8 May 2012 04:31:54 +0000 (UTC) Received: (qmail 36147 invoked by uid 500); 8 May 2012 04:31:50 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 35995 invoked by uid 500); 8 May 2012 04:31:50 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 35969 invoked by uid 99); 8 May 2012 04:31:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 May 2012 04:31:49 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of seslamian@gmail.com designates 209.85.160.48 as permitted sender) Received: from [209.85.160.48] (HELO mail-pb0-f48.google.com) (209.85.160.48) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 May 2012 04:31:42 +0000 Received: by pbbrq8 with SMTP id rq8so9950858pbb.35 for ; Mon, 07 May 2012 21:31:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=705FXIdso43zw+jSHPyHQvqq4hbH6nsk4OHNZDvXaZ4=; b=x1FrgxMo9gNslGksxncaOs/oaMS+ATxr/f9IQuqaHBRaPEHbwE26hdiouVmQ1ACvFc 3T5LvQ4PJVL75N9Lw2EVbddb/PRHiA6AtKnGLVETF62YCoPV3K4bmzRsSYIA2jdGyfRK JxUF9yOKCoIa/uBx683RsjZ0fr4ntEbIATT859Qs0gii1A/NkyvKnhM13gnN6t3r+53S tePWR4K4d2mA+7i/JPPLthSMOai4TCLdGglJQjClqL0jcihTcLzGxwPYGDq5fV2waoBY ujl2in0MUvWc3Ws8KkuNdFK8i7StAXbbkSX5jXK62oJzaXHo8UxfMwanbLXtxaPQK3ik axhQ== MIME-Version: 1.0 Received: by 10.68.233.165 with SMTP id tx5mr3278798pbc.108.1336451481543; Mon, 07 May 2012 21:31:21 -0700 (PDT) Received: by 10.142.172.6 with HTTP; Mon, 7 May 2012 21:31:21 -0700 (PDT) In-Reply-To: References: Date: Tue, 8 May 2012 09:01:21 +0430 Message-ID: Subject: Re: IndexWriter.isLock() From: S Eslamian To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=047d7b33d9b2d12fa504bf7edb44 --047d7b33d9b2d12fa504bf7edb44 Content-Type: text/plain; charset=ISO-8859-1 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 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 > > --047d7b33d9b2d12fa504bf7edb44--