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 3EEB9200B81 for ; Tue, 30 Aug 2016 04:17:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3D4B2160AC8; Tue, 30 Aug 2016 02:17:23 +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 83BCD160AB8 for ; Tue, 30 Aug 2016 04:17:22 +0200 (CEST) Received: (qmail 32973 invoked by uid 500); 30 Aug 2016 02:17:21 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 32958 invoked by uid 99); 30 Aug 2016 02:17:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Aug 2016 02:17:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 6CB262C014C for ; Tue, 30 Aug 2016 02:17:21 +0000 (UTC) Date: Tue, 30 Aug 2016 02:17:21 +0000 (UTC) From: "Vladimir Rodionov (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-16527) IOExceptions from DFS client still can cause CatalogJanitor to delete referenced files MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 30 Aug 2016 02:17:23 -0000 [ https://issues.apache.org/jira/browse/HBASE-16527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15447743#comment-15447743 ] Vladimir Rodionov commented on HBASE-16527: ------------------------------------------- CatalogJanitor: {code} Pair checkDaughterInFs(final HRegionInfo parent, final HRegionInfo daughter) SKIP-SKIP boolean references = false; HTableDescriptor parentDescriptor = getTableDescriptor(parent.getTable()); for (HColumnDescriptor family: parentDescriptor.getFamilies()) { if ((references = regionFs.hasReferences(family.getNameAsString()))) { break; } } return new Pair(Boolean.TRUE, Boolean.valueOf(references)); {code} HRegionFileSystem: {code} /** * Returns true if the specified family has reference files * @param familyName Column Family Name * @return true if family contains reference files * @throws IOException */ public boolean hasReferences(final String familyName) throws IOException { FileStatus[] files = FSUtils.listStatus(fs, getStoreDir(familyName), new FSUtils.ReferenceFileFilter(fs)); return files != null && files.length > 0; } {code} FSUtils.ReferenceFileFilter: {code} @Override protected boolean accept(Path p, @CheckForNull Boolean isDir) { if (!StoreFileInfo.isReference(p)) { return false; } try { // only files can be references. return isFile(fs, isDir, p); } catch (IOException ioe) { // Maybe the file was moved or the fs was disconnected. LOG.warn("Skipping file " + p +" due to IOException", ioe); return false; } } {code} isFile can throw IOException and we return false (not reference) - which is bad. > IOExceptions from DFS client still can cause CatalogJanitor to delete referenced files > -------------------------------------------------------------------------------------- > > Key: HBASE-16527 > URL: https://issues.apache.org/jira/browse/HBASE-16527 > Project: HBase > Issue Type: Bug > Affects Versions: 2.0.0 > Reporter: Vladimir Rodionov > Assignee: Vladimir Rodionov > Fix For: 2.0.0 > > > that was fixed partially in HBASE-13331, but issue still exists , now a little bit deeper in the code. -- This message was sent by Atlassian JIRA (v6.3.4#6332)