From java-user-return-52702-apmail-lucene-java-user-archive=lucene.apache.org@lucene.apache.org Mon May 7 12:35:21 2012 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 92782C234 for ; Mon, 7 May 2012 12:35:21 +0000 (UTC) Received: (qmail 66132 invoked by uid 500); 7 May 2012 12:35:19 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 66070 invoked by uid 500); 7 May 2012 12:35:19 -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 66062 invoked by uid 99); 7 May 2012 12:35:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 May 2012 12:35:19 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.212.182] (HELO mail-wi0-f182.google.com) (209.85.212.182) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 May 2012 12:35:14 +0000 Received: by wibhm4 with SMTP id hm4so2427730wib.5 for ; Mon, 07 May 2012 05:34:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:x-gm-message-state; bh=1JNu91TOFhoeYOlH9CdgxxKAWtWAF6tHt0A2XwlF0ds=; b=avsu3VKnxi2BgdO5pVcKIwaryB6gmulJJ5nSqp7/QdE9dxbB/7oF+1Tfsu+9X06Kea e+0fRw/8A1qOdwPhoT27VJqJj96ke5Kq47vshnbxN3Vd+fDPXqecBLP0XlcbFnGTOWEk cS67PIaNjhsxQY0gx6TCPAG+LSzDc2Njk0eiJ6YH6q9zWQm1Kklf5mYUeknQmGE9j5lO uQvWN/5zYgybWmexWGl4otzwrhs75VErDy64Bo83OlcL1b3b72GnoK9RwEQKacb8A95o f4JpJTl1e5cptLEXHD518LNcbE5IH7H5f1kCdNGpUYVhuJgrQiWT1XmjuUqLMB+GrfVS ejWQ== Received: by 10.180.83.38 with SMTP id n6mr15225734wiy.1.1336394092724; Mon, 07 May 2012 05:34:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.4.79 with HTTP; Mon, 7 May 2012 05:34:32 -0700 (PDT) In-Reply-To: References: From: Michael McCandless Date: Mon, 7 May 2012 08:34:32 -0400 Message-ID: Subject: Re: IndexWriter.isLock() To: java-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQlCgSZBuQFdnY+fcIO8iqxmhkkVL8cko8YZw+Djzzw4C6qEXY0FgRHsaNM7AXajjPTeyeCR X-Virus-Checked: Checked by ClamAV on apache.org 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