[ 
https://issues.apache.org/jira/browse/HDFS-1118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

dhruba borthakur updated HDFS-1118:
-----------------------------------

    Attachment: trunkPatch.txt

Patch for apache hadop trunk.

Todd: the finally clause should not hurt, will catch all types of exceptions 
and cleanup the socket.

Looks ok without a unit test, because the code is simple and I agree with Zheng 
that it is difficult to write a unit test

> DFSOutputStream socket leak when cannot connect to DataNode
> -----------------------------------------------------------
>
>                 Key: HDFS-1118
>                 URL: https://issues.apache.org/jira/browse/HDFS-1118
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 0.20-append, 0.20.1, 0.20.2
>            Reporter: Zheng Shao
>            Assignee: Zheng Shao
>             Fix For: 0.20-append
>
>         Attachments: HDFS-1118.1.patch, HDFS-1118.2.patch, trunkPatch.txt
>
>
> The offending code is in {{DFSOutputStream.nextBlockOutputStream}}
> This function retries several times to call {{createBlockOutputStream}}. Each 
> time when it fails, it leaves a {{Socket}} object in {{DFSOutputStream.s}}.
> That object is never closed, but overwritten the next time 
> {{createBlockOutputStream}} is called.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to