hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sur...@apache.org
Subject svn commit: r1164754 - in /hadoop/common/branches/branch-0.20-security: CHANGES.txt src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java
Date Fri, 02 Sep 2011 22:51:54 GMT
Author: suresh
Date: Fri Sep  2 22:51:54 2011
New Revision: 1164754

URL: http://svn.apache.org/viewvc?rev=1164754&view=rev
Log:
Port from 0.20-append - HDFS-1346. DFSClient receives out of order packet ack. Contributed
by Hairong Kuang.


Modified:
    hadoop/common/branches/branch-0.20-security/CHANGES.txt
    hadoop/common/branches/branch-0.20-security/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java

Modified: hadoop/common/branches/branch-0.20-security/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security/CHANGES.txt?rev=1164754&r1=1164753&r2=1164754&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.20-security/CHANGES.txt Fri Sep  2 22:51:54 2011
@@ -75,6 +75,8 @@ Release 0.20.205.0 - unreleased
     HDFS-1204. Lease expiration should recover single files, 
     not entire lease holder (Sam Rash via dhruba)
 
+    HDFS-1346. DFSClient receives out of order packet ack. (hairong)
+
   IMPROVEMENTS
 
     MAPREDUCE-2187. Reporter sends progress during sort/merge. (Anupam Seth via

Modified: hadoop/common/branches/branch-0.20-security/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java?rev=1164754&r1=1164753&r2=1164754&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java
(original)
+++ hadoop/common/branches/branch-0.20-security/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java
Fri Sep  2 22:51:54 2011
@@ -875,8 +875,9 @@ class BlockReceiver implements java.io.C
             long expected = -2;
             PipelineAck ack = new PipelineAck();
             long seqno = -2;
+            boolean localMirrorError = mirrorError;
             try { 
-              if (!mirrorError) {
+              if (!localMirrorError) {
                 // read an ack from downstream datanode
                 ack.readFields(mirrorIn);
                 if (LOG.isDebugEnabled()) {
@@ -885,7 +886,7 @@ class BlockReceiver implements java.io.C
                 }
                 seqno = ack.getSeqno();
               }
-              if (seqno >= 0 || mirrorError) {
+              if (seqno >= 0 || localMirrorError) {
                 Packet pkt = null;
                 synchronized (this) {
                   while (running && datanode.shouldRun && ackQueue.size()
== 0) {
@@ -903,7 +904,7 @@ class BlockReceiver implements java.io.C
                   pkt = ackQueue.removeFirst();
                   expected = pkt.seqno;
                   notifyAll();
-                  if (seqno != expected && !mirrorError) {
+                  if (seqno != expected && !localMirrorError) {
                     throw new IOException("PacketResponder " + numTargets +
                                           " for block " + block +
                                           " expected seqno:" + expected +



Mime
View raw message