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

Yongtao Yang updated HDFS-9641:
-------------------------------
    Description: when writing a file, an {{IOException}} may be raised in 
DFSOutputStream.DataStreamer.run(), then 'streamerClosed' may be set to true, 
then closeInternal() will be invoked, where DFSOutputStream.closed will be set 
to be true. That is to say, 'closed' is true before DFSOutputStream.close() is 
invoked, then dfsClient.endFileLease(fileId) will not be executed. The 
references of the DFSOutputStream objects will still be hold in 
DFSClient.filesBeingWritten untill the client quits. The related resources will 
not be released. HDFS-4504 is a related issue.  (was: when writing a file, an 
IOException may be raised in DFSOutputStream.DataStreamer.run(), then 
'streamerClosed' may be set to true, then closeInternal() will be invoked, 
where DFSOutputStream.closed will be set to be true. That is to say, 'closed' 
is true before DFSOutputStream.close() is invoked, then 
dfsClient.endFileLease(fileId) will not be executed. The references of the 
DFSOutputStream objects will still be hold in DFSClient.filesBeingWritten 
untill the client quits. The related resources will not be released. HDFS-4504 
is a related issue.)

> IOException in hdfs write process causes file leases not released
> -----------------------------------------------------------------
>
>                 Key: HDFS-9641
>                 URL: https://issues.apache.org/jira/browse/HDFS-9641
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs-client
>    Affects Versions: 2.6.0, 2.6.1, 2.6.2, 2.6.3
>         Environment: hadoop 2.6.0, 
>            Reporter: Yongtao Yang
>
> when writing a file, an {{IOException}} may be raised in 
> DFSOutputStream.DataStreamer.run(), then 'streamerClosed' may be set to true, 
> then closeInternal() will be invoked, where DFSOutputStream.closed will be 
> set to be true. That is to say, 'closed' is true before 
> DFSOutputStream.close() is invoked, then dfsClient.endFileLease(fileId) will 
> not be executed. The references of the DFSOutputStream objects will still be 
> hold in DFSClient.filesBeingWritten untill the client quits. The related 
> resources will not be released. HDFS-4504 is a related issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to