[ 
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

Reply via email to