Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 31732 invoked from network); 15 Sep 2006 20:08:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Sep 2006 20:08:32 -0000 Received: (qmail 50922 invoked by uid 500); 15 Sep 2006 20:08:28 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 50883 invoked by uid 500); 15 Sep 2006 20:08:28 -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 50871 invoked by uid 99); 15 Sep 2006 20:08:27 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.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; Fri, 15 Sep 2006 13:08:24 -0700 Received: from frontend3.internal (frontend3.internal [10.202.2.152]) by frontend1.messagingengine.com (Postfix) with ESMTP id EC5A6DA73E1 for ; Fri, 15 Sep 2006 16:07:40 -0400 (EDT) Received: from heartbeat1.internal ([10.202.2.160]) by frontend3.internal (MEProxy); Fri, 15 Sep 2006 16:07:42 -0400 X-Sasl-enc: ZU50pC5fzT4t9JZ4g9BSI/eb0lo8k73XVv/aDHUz54Xe 1158350862 Received: from [10.17.4.90] (pool-71-162-112-253.bstnma.fios.verizon.net [71.162.112.253]) by mail.messagingengine.com (Postfix) with ESMTP id 025D314FA5 for ; Fri, 15 Sep 2006 16:07:41 -0400 (EDT) Message-ID: <450B080C.1010509@mikemccandless.com> Date: Fri, 15 Sep 2006 16:07:40 -0400 From: Michael McCandless User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: java-dev@lucene.apache.org Subject: Re: [jira] Commented: (LUCENE-665) temporary file access denied on Windows References: <4508809C.4000204@mikemccandless.com> <4508BE24.8050600@mikemccandless.com> <450933F2.8020601@mikemccandless.com> <450A1108.5070306@mikemccandless.com> In-Reply-To: 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 Yonik Seeley wrote: >> > If it will happen so rarely, make it simpler and go directly for >> > segments_(N-1)... (treat it like your previous plan if segments_N.done >> > hadn't been written yet). >> >> Yes, true, we could just fall back to the prior segments_(N-1) file in >> this case. Though that means the reader will likely just hit an >> IOException trying to load the segments (since a commit is "in >> process") and then I'd have to re-retry against segments_N. > > You need to fall back in any case... (remember the writer crashing > scenario). > Reusing the fallback logic makes the code simpler in a case that will > almost never happen. > It's really just a question of if you put in extra retry logic or not. Yes, but with the separate file (segments_N.done) approach this is just an file exists check. In other words, the reader does a dir listing, finds the most recent segments_N for which there also exists a segments_N.done and uses that. But you're right I could re-use the retry logic I already have now, but instead of retrying forwards (N+1), retry backwards specifically when hitting an IOException when reading the contents of the segments file. I don't think it's that hard to implement ... my biggest worry is whether filesystem caching (for the likes of NFS) will cause delays, ie does NFS "cache" (under its own timeout policy) the fact that the file was N bytes when last it was opened? I would rather have a solution that doesn't rely on the caching policies of the filesystem. I will try both approaches & report back! >> I've been using NFS as my "proxy" for "least common denominator" > > I think that's a safe bet ;-) > NFS v2 or v3? Good question -- so far only v3. I will test v2 as well. So many filesystems! Mike --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org