Author: hairong Date: Mon Sep 27 18:14:20 2010 New Revision: 1001848 URL: http://svn.apache.org/viewvc?rev=1001848&view=rev Log: HDFS-1346. DFSClient receives out of order packet ack. Contributed by Hairong Kuang.
Modified: hadoop/common/branches/branch-0.20-append/CHANGES.txt hadoop/common/branches/branch-0.20-append/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java Modified: hadoop/common/branches/branch-0.20-append/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-append/CHANGES.txt?rev=1001848&r1=1001847&r2=1001848&view=diff ============================================================================== --- hadoop/common/branches/branch-0.20-append/CHANGES.txt (original) +++ hadoop/common/branches/branch-0.20-append/CHANGES.txt Mon Sep 27 18:14:20 2010 @@ -80,6 +80,8 @@ Release 0.20-append - Unreleased HDFS-1254. Support append/sync via the default configuration. (dhruba) + HDFS-1346. DFSClient receives out of order packet ack. (hairong) + Release 0.20.3 - Unreleased NEW FEATURES Modified: hadoop/common/branches/branch-0.20-append/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-append/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java?rev=1001848&r1=1001847&r2=1001848&view=diff ============================================================================== --- hadoop/common/branches/branch-0.20-append/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java (original) +++ hadoop/common/branches/branch-0.20-append/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java Mon Sep 27 18:14:20 2010 @@ -882,8 +882,9 @@ class BlockReceiver implements java.io.C long seqno = -2; PipelineAck ack = new PipelineAck(); + boolean localMirrorError = mirrorError; try { - if (!mirrorError) { + if (!localMirrorError) { // read an ack from downstream datanode ack.readFields(mirrorIn, numTargets); if (LOG.isDebugEnabled()) { @@ -892,7 +893,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) { @@ -910,7 +911,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 +