Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7D05FDB1E for ; Fri, 16 Nov 2012 21:11:13 +0000 (UTC) Received: (qmail 45972 invoked by uid 500); 16 Nov 2012 21:11:13 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 45933 invoked by uid 500); 16 Nov 2012 21:11:13 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 45924 invoked by uid 99); 16 Nov 2012 21:11:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Nov 2012 21:11:13 +0000 Date: Fri, 16 Nov 2012 21:11:13 +0000 (UTC) From: "Todd Lipcon (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <945527645.125692.1353100273242.JavaMail.jiratomcat@arcas> In-Reply-To: <1314808671.39090.1350070144050.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (HDFS-4047) BPServiceActor has nested shouldRun loops 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/HDFS-4047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13499145#comment-13499145 ] Todd Lipcon commented on HDFS-4047: ----------------------------------- Maybe I'm missing something here, but the old code had the behavior of retrying on any exception, whereas the new one only retries on IOException. If something on the inner loop throws a RuntimeException or other unchecked exception, then it won't continue looping, which is a change in behavior. Whether that's a good or bad change in behavior is up for debate, but this JIRA's description seems to indicate it's just code cleanup, where in fact more than that is happening. > BPServiceActor has nested shouldRun loops > ----------------------------------------- > > Key: HDFS-4047 > URL: https://issues.apache.org/jira/browse/HDFS-4047 > Project: Hadoop HDFS > Issue Type: Bug > Components: name-node > Affects Versions: 2.0.0-alpha > Reporter: Eli Collins > Assignee: Eli Collins > Priority: Minor > Attachments: HADOOP-4047.patch, HDFS-4047.patch, hdfs-4047.txt, hdfs-4047.txt > > > BPServiceActor#run and offerService booth have while shouldRun loops. We only need the outer one, ie we can hoist the info log from offerService out to run and remove the while loop. > {code} > BPServiceActor#run: > while (shouldRun()) { > try { > offerService(); > } catch (Exception ex) { > ... > offerService: > while (shouldRun()) { > try { > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira