Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 4000 invoked from network); 4 Nov 2007 01:49:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Nov 2007 01:49:53 -0000 Received: (qmail 27979 invoked by uid 500); 4 Nov 2007 01:49:39 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 27939 invoked by uid 500); 4 Nov 2007 01:49:39 -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 27927 invoked by uid 99); 4 Nov 2007 01:49:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Nov 2007 18:49:39 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.86.89.70] (HELO elasmtp-banded.atl.sa.earthlink.net) (209.86.89.70) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Nov 2007 01:50:02 +0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=ix.netcom.com; b=eol1VreNYNBx+YEefiVEddJpRgvKdhWeWNlTwdcfq7i+rGrJNZsdAYhNR6e3GZ7K; h=Received:Mime-Version:In-Reply-To:References:Content-Type:Message-Id:Content-Transfer-Encoding:From:Subject:Date:To:X-Mailer:X-ELNK-Trace:X-Originating-IP; Received: from [69.209.73.68] (helo=[192.168.1.64]) by elasmtp-banded.atl.sa.earthlink.net with asmtp (Exim 4.34) id 1IoUbz-00072X-6Z for java-dev@lucene.apache.org; Sat, 03 Nov 2007 21:49:15 -0400 Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: References: <21643215.1194067491098.JavaMail.jira@brutus> <472D0942.8000403@gmail.com> <55461520-82C4-4316-B200-DC0BD6F50D47@ix.netcom.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <612D3548-CE9C-4326-AED2-F55191668148@ix.netcom.com> Content-Transfer-Encoding: 7bit From: robert engels Subject: Re: [jira] Resolved: (LUCENE-1044) Behavior on hard power shutdown Date: Sat, 3 Nov 2007 20:49:16 -0500 To: java-dev@lucene.apache.org X-Mailer: Apple Mail (2.752.3) X-ELNK-Trace: 33cbdd8ed9881ca8776432462e451d7bd15d05d9470ff7101e2f6e789fd6b67bdaad4c393053755b350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 69.209.73.68 X-Virus-Checked: Checked by ClamAV on apache.org I think using FD.sync() might have enabled the proper operation on NFS in a much simpler way... I argued quite a bit that the approach people were taking was probably not correct, and/or a bug in NFS (which it seems there was at least one that was corrected in a later release). IMHO the work to make Lucene "work" on NFS was wasted - anyone using NFS (and that knows the design of it) would say that it was against the design. They only needed to move Lucene into a "server" installation. Running Lucene over NFS just isn't a good use of bandwidth or the architecture. You ended up making Lucene way more complex for a very boundary condition that had better solutions. It is one of the reasons we have stuck with 1.9, and just merge decently designed improvements. On Nov 3, 2007, at 7:35 PM, Chris Hostetter wrote: > > : This is simple not true. See FileDescriptor.sync(). > : > : There are several options, but normally it is used so that when > close > : completes, all data must be on disk. This is a much slower way to > write data. > : It is very common in database systems when committing the log file. > > Ok. I'll certainly take your word for it ... i've been trusting > the docs > for [File]OutputStream.flush()... > >>> If the intended destination of this stream is an abstraction >>> provided >>> by the underlying operating system, for example a file, then >>> flushing >>> the stream guarantees only that bytes previously written to the >>> stream >>> are passed to the operating system for writing; it does not >>> guarantee >>> that they are actually written to a physical device such as a >>> disk drive. > > I haven't looked at the internals of FileOutputStream or > FileDescriptor on > any particular platforms to see how exactly they work, but if > dealing with > the FD directly and using FD.sync() the magic bullet then I'd love > to see > a patch that uses it in FSDirectory. > > I assume the SyncFailedException it throws is rare? If it is always > thrown when using things like NFS that may be a show stopper for using > sync() in Lucene ... many people have jumped through a lot of hoops > this > past year to get Lucene working on NFS; I'd hate to see all that > work go > out the window in an effort to make Lucene ACID. (I suspect there are > more users interested in using Lucene on NFS then on using it as a > transactional data store) > >>> Throws: >>> SyncFailedException - Thrown when the buffers cannot be >>> flushed, or >>> because the system cannot guarantee that all the buffers have been >>> synchronized with physical media. > > -Hoss > > > --------------------------------------------------------------------- > 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