HDFS-12619. Do not catch and throw unchecked exceptions if IBRs fail to process. Contributed by Wei-Chiu Chuang.
This commit is contained in:
parent
97c70c7ac6
commit
4ab0c8f96a
@ -3889,11 +3889,15 @@ public void processIncrementalBlockReport(final DatanodeID nodeID,
|
|||||||
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;
|
||||||
node.setForceRegistration(true);
|
} finally {
|
||||||
throw ex;
|
if (!successful) {
|
||||||
|
node.setForceRegistration(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user