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 E8CE1115E8 for ; Thu, 24 Apr 2014 06:06:25 +0000 (UTC) Received: (qmail 90749 invoked by uid 500); 24 Apr 2014 06:06:23 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 90207 invoked by uid 500); 24 Apr 2014 06:06:17 -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 90174 invoked by uid 99); 24 Apr 2014 06:06:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Apr 2014 06:06:15 +0000 Date: Thu, 24 Apr 2014 06:06:15 +0000 (UTC) From: "Akira AJISAKA (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-6147) New blocks scanning will be delayed due to issue in BlockPoolSliceScanner#updateBytesToScan(..) 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-6147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13979332#comment-13979332 ] Akira AJISAKA commented on HDFS-6147: ------------------------------------- Thanks [~vinayrpet] for the update. +1 (non-binding). In addition, Jenkins said +1 for the patch. https://builds.apache.org/job/PreCommit-HDFS-Build/6700/ > New blocks scanning will be delayed due to issue in BlockPoolSliceScanner#updateBytesToScan(..) > ----------------------------------------------------------------------------------------------- > > Key: HDFS-6147 > URL: https://issues.apache.org/jira/browse/HDFS-6147 > Project: Hadoop HDFS > Issue Type: Bug > Components: datanode > Affects Versions: 2.4.0 > Reporter: Vinayakumar B > Assignee: Vinayakumar B > Attachments: HDFS-6147.patch, HDFS-6147.patch, HDFS-6147.patch > > > New blocks scanning will be delayed if old blocks deleted after datanode restart. > Steps: > 1. Write some blocks and wait till all scans over > 2. Restart the datanode > 3. Delete some of the blocks > 4. Write new blocks which are less in size compared to deleted blocks. > Problem: > {{BlockPoolSliceScanner#updateBytesToScan(..)}} updates {{bytesLeft}} based on following comparison > {code} if (lastScanTime < currentPeriodStart) { > bytesLeft += len; > }{code} > But in {{BlockPoolSliceScanner#assignInitialVerificationTimes()}} {{bytesLeft}} decremented using below comparison > {code}if (now - entry.verificationTime < scanPeriod) {{code} > Hence when the old blocks are deleted {{bytesLeft}} going negative. > new blocks will not be scanned until it becomes positive again. > So in both places verificationtime should be compared against scanperiod. -- This message was sent by Atlassian JIRA (v6.2#6252)