File tree Expand file tree Collapse file tree
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -351,11 +351,16 @@ class BlockSender implements java.io.Closeable {
351351 } catch (FileNotFoundException e ) {
352352 if ((e .getMessage () != null ) && !(e .getMessage ()
353353 .contains ("Too many open files" ))) {
354- // The replica is on its volume map but not on disk
354+ // The replica seems is on its volume map but not on disk.
355+ // We can't confirm here is block file lost or disk failed.
356+ // If block lost:
357+ // deleted local block file is completely unnecessary
358+ // If disk failed:
359+ // deleted local block file here may lead to missing-block
360+ // when it with only 1 replication left now.
361+ // So just notify namenode is ok.
355362 datanode
356363 .notifyNamenodeDeletedBlock (block , replica .getStorageUuid ());
357- datanode .data .invalidate (block .getBlockPoolId (),
358- new Block [] {block .getLocalBlock ()});
359364 }
360365 throw e ;
361366 } finally {
You can’t perform that action at this time.
0 commit comments