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 85D2611DA6 for ; Mon, 18 Aug 2014 03:26:19 +0000 (UTC) Received: (qmail 44136 invoked by uid 500); 18 Aug 2014 03:26:19 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 44073 invoked by uid 500); 18 Aug 2014 03:26:19 -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 44056 invoked by uid 99); 18 Aug 2014 03:26:19 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Aug 2014 03:26:19 +0000 Date: Mon, 18 Aug 2014 03:26:19 +0000 (UTC) From: "Yi Liu (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-6783) Fix HDFS CacheReplicationMonitor rescan logic 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-6783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14100245#comment-14100245 ] Yi Liu commented on HDFS-6783: ------------------------------ Hi [~arpitagarwal], I found the reason, it's bug. In rescan() {{namesystem.writeLock();}} and {{namesystem.writeUnlock();}} should be in same {{try...finally}}. This problem will occur when we call CacheReplicationMonitor#close(). Let me reopen this JIRA and fix it, please help to review. > Fix HDFS CacheReplicationMonitor rescan logic > --------------------------------------------- > > Key: HDFS-6783 > URL: https://issues.apache.org/jira/browse/HDFS-6783 > Project: Hadoop HDFS > Issue Type: Bug > Components: caching > Affects Versions: 3.0.0 > Reporter: Yi Liu > Assignee: Yi Liu > Fix For: 3.0.0, 2.6.0 > > Attachments: HDFS-6783.001.patch, HDFS-6783.002.patch, HDFS-6783.003.patch, HDFS-6783.004.patch, HDFS-6783.005.patch, HDFS-6783.006.patch > > > In monitor thread, needsRescan is set to false before real scan starts, so > for {{waitForRescanIfNeeded}} will return for the first condition: > {code} > if (!needsRescan) { > return; > } > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)