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 2A040107A3 for ; Wed, 18 Dec 2013 16:14:27 +0000 (UTC) Received: (qmail 47802 invoked by uid 500); 18 Dec 2013 16:14:12 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 47699 invoked by uid 500); 18 Dec 2013 16:14: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 47675 invoked by uid 99); 18 Dec 2013 16:14:08 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Dec 2013 16:14:08 +0000 Date: Wed, 18 Dec 2013 16:14:07 +0000 (UTC) From: "Daryn Sharp (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HDFS-5681) renewLease should not hold fsn write lock 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-5681?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daryn Sharp updated HDFS-5681: ------------------------------ Attachment: HDFS-5681.patch I believe the change is truly as simple as changing to a read lock. The lease manager methods are synchronized and other callers into the lease manager are under the write lock. My main concern was issues with the lease monitor thread but it too is acquiring the fsn write lock. There should not be race conditions. > renewLease should not hold fsn write lock > ----------------------------------------- > > Key: HDFS-5681 > URL: https://issues.apache.org/jira/browse/HDFS-5681 > Project: Hadoop HDFS > Issue Type: Bug > Components: namenode > Affects Versions: 2.0.0-alpha, 3.0.0 > Reporter: Daryn Sharp > Attachments: HDFS-5681.patch > > > Lease renewals unnecessarily hold the write lock which reduces throughput. Currently the fsn lock doubles as an "operational lock" to prevent state transitions. If the lease manager is thread-safe then a read lock is sufficient. -- This message was sent by Atlassian JIRA (v6.1.4#6159)