Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1F8F1110D2 for ; Mon, 24 Mar 2014 14:23:54 +0000 (UTC) Received: (qmail 22722 invoked by uid 500); 24 Mar 2014 14:23:47 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 22333 invoked by uid 500); 24 Mar 2014 14:23:45 -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 22269 invoked by uid 99); 24 Mar 2014 14:23:44 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Mar 2014 14:23:44 +0000 Date: Mon, 24 Mar 2014 14:23:44 +0000 (UTC) From: "Nicolas Liochon (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-10813) Possible over-catch of exceptions 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/HBASE-10813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13945150#comment-13945150 ] Nicolas Liochon commented on HBASE-10813: ----------------------------------------- yep, lgtm. Will commit if there is no objection. > Possible over-catch of exceptions > --------------------------------- > > Key: HBASE-10813 > URL: https://issues.apache.org/jira/browse/HBASE-10813 > Project: HBase > Issue Type: Improvement > Components: regionserver, util > Affects Versions: 0.96.1 > Reporter: Ding Yuan > Attachments: HBase-10813-trunk.patch > > > There are a few cases found by a tool that are possibly over-catch of exceptions, especially those that will abort the server. Over-catching these exceptions may unexpectedly abort the server, and may cause problems in the future when code in the try-block evolves. I am attaching a patch against trunk that constrains the catch blocks to the exact exceptions that were thrown. > My tool actually found one more case in 0.96.1, but I found it has already been fixed in trunk: > {noformat} > Line: 1175, File: "org/apache/hadoop/hbase/master/SplitLogManager.java" > 1173: try { > 1174: Thread.sleep(20); > 1175:- } catch (Exception ignoreE) { > 1175:+ } catch (InterruptedException e) { > 1176: // ignore > 1177: } > {noformat} > Any feedbacks are much appreciated! -- This message was sent by Atlassian JIRA (v6.2#6252)