Return-Path: Delivered-To: apmail-hadoop-core-user-archive@www.apache.org Received: (qmail 81558 invoked from network); 7 Jan 2009 19:04:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Jan 2009 19:04:55 -0000 Received: (qmail 71057 invoked by uid 500); 7 Jan 2009 19:04:49 -0000 Delivered-To: apmail-hadoop-core-user-archive@hadoop.apache.org Received: (qmail 71009 invoked by uid 500); 7 Jan 2009 19:04:49 -0000 Mailing-List: contact core-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-user@hadoop.apache.org Delivered-To: mailing list core-user@hadoop.apache.org Received: (qmail 70998 invoked by uid 99); 7 Jan 2009 19:04:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jan 2009 11:04:49 -0800 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 [216.145.54.173] (HELO mrout3.yahoo.com) (216.145.54.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jan 2009 19:04:38 +0000 Received: from [10.72.106.226] (heighthigh-lx.corp.yahoo.com [10.72.106.226]) by mrout3.yahoo.com (8.13.6/8.13.6/y.out) with ESMTP id n07J3v06059160 for ; Wed, 7 Jan 2009 11:03:57 -0800 (PST) DomainKey-Signature: a=rsa-sha1; s=serpent; d=yahoo-inc.com; c=nofws; q=dns; h=message-id:date:from:user-agent:mime-version:to:subject: references:in-reply-to:content-type:content-transfer-encoding; b=DkYDoFdbtF6cN4yDPjTn7LLw2BFf/y9+/ZKYTJvp0lrQaR+Uwz4OIf1PEep/k4EG Message-ID: <4964FC9D.4010405@yahoo-inc.com> Date: Wed, 07 Jan 2009 11:03:57 -0800 From: Raghu Angadi User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: core-user@hadoop.apache.org Subject: Re: Question about the Namenode edit log and syncing the edit log to disk. 0.19.0 References: <4964F804.2010709@attributor.com> In-Reply-To: <4964F804.2010709@attributor.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Did you look at FSEditLog.EditLogFileOutputStream.flushAndSync()? This code was re-organized sometime back. But the guarantees it provides should be exactly same as before. Please let us know otherwise. Raghu. Jason Venner wrote: > I have always assumed (which is clearly my error) that edit log writes > were flushed to storage to ensure that the edit log was consistent > during machine crash recovery. > > I have been working through FSEditLog.java and I don't see any calls of > force(true) on the file channel or sync on the file descriptor, and the > edit log is not opened with an 's' or 'd' ie: the open flags are "rw" > and not "rws" or "rwd". > > The only thing I see in the code, is that the space in the file where > the updates will be written is preallocated. > > Have I missed the mechanism that the edit log data is flushed to the disk? > > Is the edit log data not forcibly flushed to the disk, instead reling on > the host operating system to perform the physical writes at a later date? > > Thanks -- Jason