Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 84125 invoked from network); 11 Sep 2006 17:34:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Sep 2006 17:34:42 -0000 Received: (qmail 51744 invoked by uid 500); 11 Sep 2006 17:34:36 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 51661 invoked by uid 500); 11 Sep 2006 17:34:36 -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 51551 invoked by uid 99); 11 Sep 2006 17:34:35 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Sep 2006 10:34:35 -0700 Authentication-Results: idunn.apache.osuosl.org smtp.mail=rengels@ix.netcom.com; spf=permerror Authentication-Results: idunn.apache.osuosl.org header.from=rengels@ix.netcom.com; domainkeys=good X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received-SPF: error (idunn.apache.osuosl.org: domain ix.netcom.com from 209.86.89.70 cause and error) DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 Received: from ([209.86.89.70:54635] helo=elasmtp-banded.atl.sa.earthlink.net) by idunn.apache.osuosl.org (ecelerity 2.1 r(10620)) with ESMTP id 60/50-25981-43E95054 for ; Mon, 11 Sep 2006 10:34:45 -0700 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=ix.netcom.com; b=t2cwBn9ENCbX0CJR1JiVwT8pR03cuU9iP957O2rcuu1T9QawDzoDeo8l4+D3JejN; 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 [66.245.135.50] (helo=[192.168.1.116]) by elasmtp-banded.atl.sa.earthlink.net with asmtp (TLSv1:RC4-SHA:128) (Exim 4.34) id 1GMpft-0004Nq-V5 for java-dev@lucene.apache.org; Mon, 11 Sep 2006 13:34:26 -0400 Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: <200609111914.00062.paul.elschot@xs4all.nl> References: <4504ACA4.6090309@manawiz.com> <200609111914.00062.paul.elschot@xs4all.nl> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <71382EBC-0231-4D1D-8291-D4389CE9462E@ix.netcom.com> Content-Transfer-Encoding: 7bit From: robert engels Subject: Re: After kill -9 index was corrupt Date: Mon, 11 Sep 2006 12:34:22 -0500 To: java-dev@lucene.apache.org X-Mailer: Apple Mail (2.752.2) X-ELNK-Trace: 33cbdd8ed9881ca8776432462e451d7bd15d05d9470ff7104ee7f28192752d9f35ebd3fb1582f766350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 66.245.135.50 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N A kill -9 should not affect the OS's writing of dirty buffers (including directory modifications). If this were the case, massive system corruption would almost always occur every time a kill -9 was used with any program. The only thing a kill -9 affects is user level buffering. The OS always maintains a consistent view of directory modifications and or file modification that were requesting by programs. This entire discussion is pointless. If the hardware is performing lazy writes, then corruption might be caused during a hard-reset (e.g. power failure, hardware failure (cpu lockup), or device driver failure in some VERY RARE cases). Even a kernel panic should allow the physical devices to flush their dirty buffers (as the controller can in many cases detect this). The only way to prevent this is if the OS exposes a system call to synchronously force the hardware to flush any buffers. The Java fsync () could use the OS call to peform this operation, but most likely would not since the performance penalty would be significant, and those users requiring this level of reliability would be better served by using UPSs and fault-tolerant systems (at every level - CPU, disk, etc.). On Sep 11, 2006, at 12:13 PM, Paul Elschot wrote: > On Monday 11 September 2006 15:36, Yonik Seeley wrote: >> On 9/10/06, Chuck Williams wrote: >>> Could a kill -9 prevent data from reaching disk for files that were >>> previously closed? >> >> No. After a close() the OS should have all the data... the process >> may be killed but the OS will eventually flush all the buffers, etc. >> File creation is pretty much always synchronous so I have no idea how >> your problem could have happened (missing segment files). IO >> error or >> something else temporarily filling up the disk? > > "Pretty much always" is logically equivalent to "not always" :) , > see also > below. > >> If you have a power loss or crash, then that *can* cause data loss. >> There may be mount options to make more file operations synchronous, >> or you could maybe write your own Directory implementation to make >> things more synchronous. > > New segments will have to be flushed/fsynced before the segments > file. This could be hidden in a Directory in case a Directory hides > Lucene's > segments file. > > Regards, > Paul Elschot > > > --------------------------------------------------------------------- > 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