You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by cn...@apache.org on 2013/09/17 21:46:42 UTC

svn commit: r1524193 - in /hadoop/common/branches/branch-1-win: CHANGES.branch-1-win.txt src/hdfs/org/apache/hadoop/hdfs/DistributedFileSystem.java

Author: cnauroth
Date: Tue Sep 17 19:46:42 2013
New Revision: 1524193

URL: http://svn.apache.org/r1524193
Log:
HDFS-5211. Race condition between DistributedFileSystem#close and FileSystem#close can cause return of a closed DistributedFileSystem instance from the FileSystem cache. Contributed by Chris Nauroth.

Modified:
    hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt
    hadoop/common/branches/branch-1-win/src/hdfs/org/apache/hadoop/hdfs/DistributedFileSystem.java

Modified: hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt?rev=1524193&r1=1524192&r2=1524193&view=diff
==============================================================================
--- hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt (original)
+++ hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt Tue Sep 17 19:46:42 2013
@@ -491,3 +491,7 @@ Branch-hadoop-1-win (branched from branc
 
     HDFS-4963. Improve multihoming support in namenode. (Arpit Agarwal via
     cnauroth)
+
+    HDFS-5211. Race condition between DistributedFileSystem#close and
+    FileSystem#close can cause return of a closed DistributedFileSystem instance
+    from the FileSystem cache. (cnauroth)

Modified: hadoop/common/branches/branch-1-win/src/hdfs/org/apache/hadoop/hdfs/DistributedFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1-win/src/hdfs/org/apache/hadoop/hdfs/DistributedFileSystem.java?rev=1524193&r1=1524192&r2=1524193&view=diff
==============================================================================
--- hadoop/common/branches/branch-1-win/src/hdfs/org/apache/hadoop/hdfs/DistributedFileSystem.java (original)
+++ hadoop/common/branches/branch-1-win/src/hdfs/org/apache/hadoop/hdfs/DistributedFileSystem.java Tue Sep 17 19:46:42 2013
@@ -366,10 +366,9 @@ public class DistributedFileSystem exten
   /** {@inheritDoc} */
   public void close() throws IOException {
     try {
-      super.processDeleteOnExit();
-      dfs.close();
-    } finally {
       super.close();
+    } finally {
+      dfs.close();
     }
   }