HDFS-12619. Do not catch and throw unchecked exceptions if IBRs fail to process. Contributed by Wei-Chiu Chuang.
(cherry picked from commit 4ab0c8f96a
)
This commit is contained in:
parent
143dbf8497
commit
579612c9d2
|
@ -3883,11 +3883,15 @@ public class BlockManager implements BlockStatsMXBean {
|
||||||
throw new IOException(
|
throw new IOException(
|
||||||
"Got incremental block report from unregistered or dead node");
|
"Got incremental block report from unregistered or dead node");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean successful = false;
|
||||||
try {
|
try {
|
||||||
processIncrementalBlockReport(node, srdb);
|
processIncrementalBlockReport(node, srdb);
|
||||||
} catch (Exception ex) {
|
successful = true;
|
||||||
|
} finally {
|
||||||
|
if (!successful) {
|
||||||
node.setForceRegistration(true);
|
node.setForceRegistration(true);
|
||||||
throw ex;
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue