Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 41246 invoked from network); 27 Aug 2006 20:40:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 Aug 2006 20:40:20 -0000 Received: (qmail 38258 invoked by uid 500); 27 Aug 2006 20:40:13 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 38227 invoked by uid 500); 27 Aug 2006 20:40:13 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 38216 invoked by uid 99); 27 Aug 2006 20:40:13 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 Aug 2006 13:40:13 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [66.111.4.25] (HELO out1.smtp.messagingengine.com) (66.111.4.25) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 Aug 2006 13:40:12 -0700 Received: from frontend3.internal (frontend3.internal [10.202.2.152]) by frontend1.messagingengine.com (Postfix) with ESMTP id B6E31D9E81A for ; Sun, 27 Aug 2006 16:39:50 -0400 (EDT) Received: from heartbeat1.internal ([10.202.2.160]) by frontend3.internal (MEProxy); Sun, 27 Aug 2006 16:39:51 -0400 X-Sasl-enc: h8x8fqNezppUQs9JEZKEBKMHfdj8miC44TFpGa0vn3kQ 1156711191 Received: from [10.17.4.3] (pool-72-70-33-153.bstnma.fios.verizon.net [72.70.33.153]) by mail.messagingengine.com (Postfix) with ESMTP id 6FCA915850 for ; Sun, 27 Aug 2006 16:39:51 -0400 (EDT) Message-ID: <44F20316.7070208@mikemccandless.com> Date: Sun, 27 Aug 2006 16:39:50 -0400 From: Michael McCandless User-Agent: Thunderbird 2.0a1 (X11/20060724) MIME-Version: 1.0 To: java-dev@lucene.apache.org Subject: Re: java.io.IOException: Access is denied on java.io.WinNTFileSystem.createFileExclusively References: <44F2019C.3050705@mikemccandless.com> In-Reply-To: <44F2019C.3050705@mikemccandless.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Transplanting this thread off of java-user to discuss a more java-dev question I have (below): http://www.gossamer-threads.com/lists/lucene/java-user/39382 > Yonik Seeley wrote: >> On 8/27/06, Doron Cohen wrote: >>> I plan to submit an update to that patch later today accommodating your >>> comments (and others); It will most probably retry for IOExceptions (not >>> analyzing the exception text); also, it would return false if the >>> *retry* >>> for obtain() failed with exception. >> >> Lock.obtain(timeout) already has retry/timeout logic around >> Lock.obtain(), so wouldn't the change to return false on an >> IOException be sufficient? User level applications should then use >> obtain(timeout) rather than obtain() unless they want to do >> timeout/retry logic themselves. > > I would agree: the retry/timeout logic already exists above so let's > just return false on hitting any IOException when calling createNewFile. > > (Doron, this still wouldn't fix the other strange "across the board" IO > problems you see on Windows. I'd really like to reproduce this but so > far (running your stress test) I can't -- are you sure it's not a virus > checker or something?). I think on hitting the IOException on java.io.File.createNewFile, we should return false (so timeout/retry logic can handle it). However we should also message this to the user to make debugging simple (vs just silently swallowing the exception). But: how to do so? I like the infoStream that IndexWriter supports, but, should we adopt [one of] the Java logging APIs (Apache commons logging, java.util.logging, log4j, etc.)? As far as I can tell Lucene doesn't do so now, so, what's the "right way" to let the user know that an IOException occurred and this is why the "lock obtain" failed? Mike --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org