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 72F7C10124 for ; Mon, 16 Dec 2013 17:27:13 +0000 (UTC) Received: (qmail 85570 invoked by uid 500); 16 Dec 2013 17:27:09 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 85443 invoked by uid 500); 16 Dec 2013 17:27:09 -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 85401 invoked by uid 99); 16 Dec 2013 17:27:08 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Dec 2013 17:27:08 +0000 Date: Mon, 16 Dec 2013 17:27:08 +0000 (UTC) From: "Hudson (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-5665) Remove the unnecessary writeLock while initializing CacheManager in FsNameSystem Ctor 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-5665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13849355#comment-13849355 ] Hudson commented on HDFS-5665: ------------------------------ SUCCESS: Integrated in Hadoop-trunk-Commit #4887 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/4887/]) HDFS-5665. Remove the unnecessary writeLock while initializing CacheManager in FsNameSystem Ctor. (Uma Maheswara Rao G via Andrew Wang) (wang: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1551270) * /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt * /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java > Remove the unnecessary writeLock while initializing CacheManager in FsNameSystem Ctor > ------------------------------------------------------------------------------------- > > Key: HDFS-5665 > URL: https://issues.apache.org/jira/browse/HDFS-5665 > Project: Hadoop HDFS > Issue Type: Improvement > Components: namenode > Affects Versions: 3.0.0, 2.2.0 > Reporter: Uma Maheswara Rao G > Assignee: Uma Maheswara Rao G > Fix For: 3.0.0 > > Attachments: HDFS-5665.patch > > > I just saw the below piece of code in Fsnamesystem ctor. > {code} > writeLock(); > try { > this.cacheManager = new CacheManager(this, conf, blockManager); > } finally { > writeUnlock(); > } > {code} > It seems unnecessary to keep writeLock here. I am not sure if there is a clear reason to keep the lock. -- This message was sent by Atlassian JIRA (v6.1.4#6159)