Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 80837 invoked from network); 13 Nov 2007 10:37:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Nov 2007 10:37:36 -0000 Received: (qmail 56972 invoked by uid 500); 13 Nov 2007 10:37:18 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 56928 invoked by uid 500); 13 Nov 2007 10:37:17 -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 56917 invoked by uid 99); 13 Nov 2007 10:37:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Nov 2007 02:37:17 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [66.111.4.26] (HELO out2.smtp.messagingengine.com) (66.111.4.26) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Nov 2007 10:37:21 +0000 Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id C692A46DB2 for ; Tue, 13 Nov 2007 05:36:59 -0500 (EST) Received: from web8.messagingengine.com ([10.202.2.217]) by compute2.internal (MEProxy); Tue, 13 Nov 2007 05:36:59 -0500 Received: by web8.messagingengine.com (Postfix, from userid 99) id A5F77475C5; Tue, 13 Nov 2007 05:36:59 -0500 (EST) Message-Id: <1194950219.29766.1221018253@webmail.messagingengine.com> X-Sasl-Enc: omaza0JaulKoGthp6CIKsi6hqz7mhs6Ve6Gl+QXVunb5 1194950219 From: "Michael McCandless" To: java-dev@lucene.apache.org Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MessagingEngine.com Webmail Interface References: <11500990.1194903350969.JavaMail.jira@brutus> <1194909297.25216.1220941175@webmail.messagingengine.com> <4738E4EB.9000102@gmail.com> <94FDD5BE-9A78-4D08-9374-177D88776798@ix.netcom.com> <4738E959.40306@gmail.com> <536D36A8-64C1-4AC4-9F75-43396759FF79@ix.netcom.com> <079234A8-00A3-48D9-A942-0BE506A9C8F6@ix.netcom.com> Subject: Re: [jira] Commented: (LUCENE-743) IndexReader.reopen() In-Reply-To: <079234A8-00A3-48D9-A942-0BE506A9C8F6@ix.netcom.com> Date: Tue, 13 Nov 2007 05:36:59 -0500 X-Virus-Checked: Checked by ClamAV on apache.org I've become lost in this thread. It started with the unit test in the reopen patch, suddenly jumped to NFS and lockless commits, then sync() got pulled in as well. The retry logic (part of lockless commits) already handles this case of a segments file being partially written & falling back to the previous one. Robert what problem are you trying to solve here? Mike "robert engels" wrote: > True. It seems that the Lucene code might be a bit more resilient > here though, using the following: > > 1. open the segments file exclusively (if this fails, updates are > prohibited, and an exception is thrown) > 2. write new segments > 3. write segments.new including segments hash & sync > 4. update segments file including hash > 5. delete segments that you can > > Then if it crashes in step 4, it is easy to know segments is bad (out > of date) and use segments.new > If it crashes in steps 3, then segments.new is easily detected as > being corrupt (hash does not match), so you know segments is valid. > > if there are segments that cannot be deleted in 5, every open can > check if it can delete them... > > A similar technique can be used if using lockless commits, just need > to make it segments.XXX.new, etc. > > On Nov 12, 2007, at 7:21 PM, Yonik Seeley wrote: > > > On Nov 12, 2007 7:19 PM, robert engels wrote: > >> I would still argue that it is an incorrect setup - almost as bad as > >> "not plugging the computer in". > > > > A user themselves could even go in and look at the index files (I've > > done so myself)... as could a backup program or whatever. It's a fact > > of life on windows that a move or delete can fail. > > > > -Yonik > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org > > For additional commands, e-mail: java-dev-help@lucene.apache.org > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-dev-help@lucene.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org