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 CB926200CD4 for ; Sat, 29 Jul 2017 16:53:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C9C8E164FCF; Sat, 29 Jul 2017 14:53:08 +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 1CA18164FCD for ; Sat, 29 Jul 2017 16:53:07 +0200 (CEST) Received: (qmail 72850 invoked by uid 500); 29 Jul 2017 14:53: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 72839 invoked by uid 99); 29 Jul 2017 14:53:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Jul 2017 14:53:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 93050C01DB for ; Sat, 29 Jul 2017 14:53:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-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 (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id rp4fRcJ7COgL for ; Sat, 29 Jul 2017 14:53:05 +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 CABF65FD6F for ; Sat, 29 Jul 2017 14:53:04 +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 C397EE0DAF for ; Sat, 29 Jul 2017 14:53:02 +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 5BADA24655 for ; Sat, 29 Jul 2017 14:53:00 +0000 (UTC) Date: Sat, 29 Jul 2017 14:53:00 +0000 (UTC) From: "Yongjun Zhang (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-12217) HDFS snapshots doesn't capture all open files when one of the open files is deleted MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 29 Jul 2017 14:53:09 -0000 [ https://issues.apache.org/jira/browse/HDFS-12217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16106143#comment-16106143 ] Yongjun Zhang commented on HDFS-12217: -------------------------------------- Hi [~manojg], {quote} LeaseManager#getINodeWithLeases already logs the warning message with full exception and stack trace. {quote} The logging you mentioned above happens at the server side and is about the cause of the failure. What I hope to see is the exception chain at client side when SnapshotException is thrown, so user can see immediately what caused the exception in one place. Collecting the server side log to match to the client symptom is a support effort which I hope we can avoid if possible. Currently SnapshotException is: {code} public class SnapshotException extends IOException { private static final long serialVersionUID = 1L; public SnapshotException(final String message) { super(message); } public SnapshotException(final Throwable cause) { super(cause); } } {code} I examined all the places that call {{SnapshotException(final String message)}}, none of them is called inside exception catch block. So the patch here is the first time that we are throwing SnapshotException inside an exception catch block. Interestingly, I don't see any places using {{SnapshotException(final Throwable cause)}}. So it seems introducing a method {{public SnapshotException(String message, Throwable cause)}} and use it in this patch will not introduce inconsistency because it will be the first use of it. That's what I preferred. However, if you like to create a new jira to add the new API, and change the single use which is introduced by the patch here, It's ok with me too. Thanks. > HDFS snapshots doesn't capture all open files when one of the open files is deleted > ----------------------------------------------------------------------------------- > > Key: HDFS-12217 > URL: https://issues.apache.org/jira/browse/HDFS-12217 > Project: Hadoop HDFS > Issue Type: Bug > Components: snapshots > Affects Versions: 3.0.0-alpha1 > Reporter: Manoj Govindassamy > Assignee: Manoj Govindassamy > Attachments: HDFS-12217.01.patch, HDFS-12217.02.patch, HDFS-12217.03.patch > > > With the fix for HDFS-11402, HDFS Snapshots can additionally capture all the open files. Just like all other files, these open files in the snapshots will remain immutable. But, sometimes it is found that snapshots fail to capture all the open files in the system. > Under the following conditions, LeaseManager will fail to find INode corresponding to an active lease > * a file is opened for writing (LeaseManager allots a lease), and > * the same file is deleted while it is still open for writing and having active lease, and > * the same file is not referenced in any other Snapshots/Trash > {{INode[] LeaseManager#getINodesWithLease()}} can thus return null for few leases there by causing the caller to trip over and not return all the open files needed by the snapshot manager. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org