|
@@ -3889,11 +3889,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) {
|
|
|
|
- node.setForceRegistration(true);
|
|
|
|
- throw ex;
|
|
|
|
|
|
+ successful = true;
|
|
|
|
+ } finally {
|
|
|
|
+ if (!successful) {
|
|
|
|
+ node.setForceRegistration(true);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|