hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-10813) Possible over-catch of exceptions
Date Wed, 09 Apr 2014 20:45:17 GMT

    [ https://issues.apache.org/jira/browse/HBASE-10813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13964646#comment-13964646
] 

Hudson commented on HBASE-10813:
--------------------------------

FAILURE: Integrated in HBase-TRUNK #5074 (See [https://builds.apache.org/job/HBase-TRUNK/5074/])
HBASE-10813 Possible over-catch of exceptions (Ding Yuan) (nkeywal: rev 1586006)
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/CloseRegionHandler.java
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/Merge.java


> 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
>            Assignee: Ding Yuan
>             Fix For: 0.99.0
>
>         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)

Mime
View raw message