Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E378111DA8 for ; Tue, 19 Aug 2014 18:03:18 +0000 (UTC) Received: (qmail 36500 invoked by uid 500); 19 Aug 2014 18:03:18 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 36456 invoked by uid 500); 19 Aug 2014 18:03:18 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 36442 invoked by uid 99); 19 Aug 2014 18:03:18 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Aug 2014 18:03:18 +0000 Date: Tue, 19 Aug 2014 18:03:18 +0000 (UTC) From: "Colin Patrick McCabe (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-6871) Improve NameNode performance when creating file MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-6871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14102559#comment-14102559 ] Colin Patrick McCabe commented on HDFS-6871: -------------------------------------------- Good idea. Can you add a comment near the {{if (!skipLogSync)}} code, explaining that we only should skip the log sync when this delete operation is part of a larger create-with-overwrite (or other) operation that does its own {{logSync}}? +1 once that's addressed. > Improve NameNode performance when creating file > ------------------------------------------------- > > Key: HDFS-6871 > URL: https://issues.apache.org/jira/browse/HDFS-6871 > Project: Hadoop HDFS > Issue Type: Improvement > Components: namenode, performance > Reporter: Yi Liu > Assignee: Yi Liu > Priority: Critical > Fix For: 2.6.0 > > Attachments: HDFS-6871.001.patch > > > Creating file with overwrite flag will cause NN fall into flush edit logs and block other requests if the file exists. > When we create a file with overwrite flag (default is true) in HDFS, NN will remove original file if it exists. In FSNamesystem#startFileInternal, NN already holds the write lock, it calls {{deleteInt}} if the file exists, there is logSync in {{deleteInt}}. So in this case, logSync is under write lock, it will heavily affect the NN performance. > We should ignore the force logSync in {{deleteInt}} in this case. -- This message was sent by Atlassian JIRA (v6.2#6252)