hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhr...@apache.org
Subject svn commit: r661918 - in /hadoop/core/trunk: CHANGES.txt src/java/org/apache/hadoop/dfs/DFSClient.java
Date Sat, 31 May 2008 00:07:37 GMT
Author: dhruba
Date: Fri May 30 17:07:37 2008
New Revision: 661918

URL: http://svn.apache.org/viewvc?rev=661918&view=rev
Log:
HADOOP-2669. DFSClient locks pendingCreates appropriately. (dhruba)


Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=661918&r1=661917&r2=661918&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Fri May 30 17:07:37 2008
@@ -362,6 +362,8 @@
 
     HADOOP-2159 Namenode stuck in safemode. The counter blockSafe should
     not be decremented for invalid blocks. (hairong)
+
+    HADOOP-2669. DFSClient locks pendingCreates appropriately. (dhruba)
  
 Release 0.17.0 - 2008-05-18
 

Modified: hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java?rev=661918&r1=661917&r2=661918&view=diff
==============================================================================
--- hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java (original)
+++ hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java Fri May 30 17:07:37 2008
@@ -732,8 +732,10 @@
       while (clientRunning) {
         if (System.currentTimeMillis() - lastRenewed > (LEASE_SOFTLIMIT_PERIOD / 2)) {
           try {
-            if (pendingCreates.size() > 0)
-              namenode.renewLease(clientName);
+            synchronized (pendingCreates) {
+              if (pendingCreates.size() > 0)
+                namenode.renewLease(clientName);
+            }
             lastRenewed = System.currentTimeMillis();
           } catch (IOException ie) {
             String err = StringUtils.stringifyException(ie);



Mime
View raw message