|
@@ -875,8 +875,9 @@ class BlockReceiver implements java.io.Closeable, FSConstants {
|
|
long expected = -2;
|
|
long expected = -2;
|
|
PipelineAck ack = new PipelineAck();
|
|
PipelineAck ack = new PipelineAck();
|
|
long seqno = -2;
|
|
long seqno = -2;
|
|
|
|
+ boolean localMirrorError = mirrorError;
|
|
try {
|
|
try {
|
|
- if (!mirrorError) {
|
|
|
|
|
|
+ if (!localMirrorError) {
|
|
// read an ack from downstream datanode
|
|
// read an ack from downstream datanode
|
|
ack.readFields(mirrorIn);
|
|
ack.readFields(mirrorIn);
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
@@ -885,7 +886,7 @@ class BlockReceiver implements java.io.Closeable, FSConstants {
|
|
}
|
|
}
|
|
seqno = ack.getSeqno();
|
|
seqno = ack.getSeqno();
|
|
}
|
|
}
|
|
- if (seqno >= 0 || mirrorError) {
|
|
|
|
|
|
+ if (seqno >= 0 || localMirrorError) {
|
|
Packet pkt = null;
|
|
Packet pkt = null;
|
|
synchronized (this) {
|
|
synchronized (this) {
|
|
while (running && datanode.shouldRun && ackQueue.size() == 0) {
|
|
while (running && datanode.shouldRun && ackQueue.size() == 0) {
|
|
@@ -903,7 +904,7 @@ class BlockReceiver implements java.io.Closeable, FSConstants {
|
|
pkt = ackQueue.removeFirst();
|
|
pkt = ackQueue.removeFirst();
|
|
expected = pkt.seqno;
|
|
expected = pkt.seqno;
|
|
notifyAll();
|
|
notifyAll();
|
|
- if (seqno != expected && !mirrorError) {
|
|
|
|
|
|
+ if (seqno != expected && !localMirrorError) {
|
|
throw new IOException("PacketResponder " + numTargets +
|
|
throw new IOException("PacketResponder " + numTargets +
|
|
" for block " + block +
|
|
" for block " + block +
|
|
" expected seqno:" + expected +
|
|
" expected seqno:" + expected +
|