Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7C1B6200C5B for ; Thu, 27 Apr 2017 11:40:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7AB75160BA7; Thu, 27 Apr 2017 09:40:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C17DB160B98 for ; Thu, 27 Apr 2017 11:40:08 +0200 (CEST) Received: (qmail 64129 invoked by uid 500); 27 Apr 2017 09:40:07 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 64117 invoked by uid 99); 27 Apr 2017 09:40:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Apr 2017 09:40:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 552C31B0D88 for ; Thu, 27 Apr 2017 09:40:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id KYydWPZcbAAH for ; Thu, 27 Apr 2017 09:40:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 416D35FC8C for ; Thu, 27 Apr 2017 09:40:06 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 8BF15E0D3A for ; Thu, 27 Apr 2017 09:40:05 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 6CC4E21DE7 for ; Thu, 27 Apr 2017 09:40:04 +0000 (UTC) Date: Thu, 27 Apr 2017 09:40:04 +0000 (UTC) From: "Akira Ajisaka (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HDFS-10843) Update space quota when a UC block is completed rather than committed. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 27 Apr 2017 09:40:09 -0000 [ https://issues.apache.org/jira/browse/HDFS-10843?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Akira Ajisaka updated HDFS-10843: --------------------------------- Fix Version/s: 2.8.0 > Update space quota when a UC block is completed rather than committed. > ---------------------------------------------------------------------- > > Key: HDFS-10843 > URL: https://issues.apache.org/jira/browse/HDFS-10843 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs, namenode > Affects Versions: 2.6.0 > Reporter: Erik Krogen > Assignee: Erik Krogen > Fix For: 2.8.0, 2.7.4, 3.0.0-alpha2 > > Attachments: HDFS-10843.000.patch, HDFS-10843.001.patch, HDFS-10843.002.patch, HDFS-10843.003.patch, HDFS-10843.004.patch, HDFS-10843.005.patch, HDFS-10843-branch-2.005.patch, HDFS-10843-branch-2.7.005.patch > > > Currently when a block has been committed but has not yet been completed, the cached size (used for the quota feature) of the directory containing that block differs from the computed size. This results in log messages of the following form: > bq. ERROR namenode.NameNode (DirectoryWithQuotaFeature.java:checkStoragespace(141)) - BUG: Inconsistent storagespace for directory /TestQuotaUpdate. Cached = 512 != Computed = 8192 > When a block is initially started under construction, the used space is conservatively set to a full block. When the block is committed, the cached size is updated to the final size of the block. However, the calculation of the computed size uses the full block size until the block is completed, so in the period where the block is committed but not completed they disagree. To fix this we need to decide which is correct and fix the other to match. It seems to me that the cached size is correct since once the block is committed its size will not change. > This can be reproduced using the following steps: > - Create a directory with a quota > - Start writing to a file within this directory > - Prevent all datanodes to which the file is written from communicating the corresponding BlockReceivedAndDeletedRequestProto to the NN temporarily (i.e. simulate a transient network partition/delay) > - During this time, call DistributedFileSystem.getContentSummary() on the directory with the quota -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org