hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-10549) Correctly revoke file leases when closing files
Date Wed, 17 Aug 2016 23:21:20 GMT

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

Hudson commented on HDFS-10549:
-------------------------------

SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10295 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/10295/])
HDFS-10549. Correctly revoke file leases when closing files. Contributed (xiao: rev 2aa5e2c40364cf1e90e6af7851801f5eda759002)
* (edit) hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSStripedOutputStream.java
* (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDistributedFileSystem.java
* (edit) hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSOutputStream.java
* (edit) hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java


> Correctly revoke file leases when closing files
> -----------------------------------------------
>
>                 Key: HDFS-10549
>                 URL: https://issues.apache.org/jira/browse/HDFS-10549
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs-client
>    Affects Versions: 2.7.1
>            Reporter: Yiqun Lin
>            Assignee: Yiqun Lin
>             Fix For: 2.8.0, 3.0.0-alpha2
>
>         Attachments: HDFS-10549.001.patch, HDFS-10549.002.patch, HDFS-10549.003.patch,
HDFS-10549.004.patch, HDFS-10549.005.patch
>
>
> As HADOOP-13264 memtioned, the code dfsClient.endFileLease(fileId) in {{DFSOutputStream}}
will not be executed when the IOException happened in {{closeImpl()}}.
> {code}
>   public void close() throws IOException {
>     synchronized (this) {
>       try (TraceScope ignored =
>           dfsClient.newPathTraceScope("DFSOutputStream#close", src)) {
>         closeImpl();
>       }
>     }
>     dfsClient.endFileLease(fileId);
>     }
>   }
> {code}
> This will cause that the files not be closed in {{DFSClient}} and finally lead to the
memory leak. In {{DFSStripedOutputStream}}, it existed the same problem.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message