HDFS-12619. Do not catch and throw unchecked exceptions if IBRs fail to process. Contributed by Wei-Chiu Chuang.
(cherry picked from commit 4ab0c8f96a41c573cc1f1e71c18871d243f952b9) (cherry picked from commit ce93a2b84badacb6d0b19bbb149afbcf8f38c665)
This commit is contained in:
parent
3b47f6bdfd
commit
a83f87e170
@ -3290,11 +3290,15 @@ public void processIncrementalBlockReport(final DatanodeID nodeID,
|
||||
throw new IOException(
|
||||
"Got incremental block report from unregistered or dead node");
|
||||
}
|
||||
|
||||
boolean successful = false;
|
||||
try {
|
||||
processIncrementalBlockReport(node, srdb);
|
||||
} catch (Exception ex) {
|
||||
node.setForceRegistration(true);
|
||||
throw ex;
|
||||
successful = true;
|
||||
} finally {
|
||||
if (!successful) {
|
||||
node.setForceRegistration(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user