Affects Version/s: None
Fix Version/s: 2.7.0
Hadoop Flags:Incompatible change, Reviewed
As discussed in
HDFS-6618, if a deletion of tree fails in the middle, any collected inodes and blocks will not be removed from INodeMap and BlocksMap.
Since fsimage is saved by iterating over INodeMap, the leak will persist across name node restart. Although blanked out inodes will not have reference to blocks, blocks will still refer to the inode as BlockCollection. As long as it is not null, blocks will live on. The leaked blocks from blanked out inodes will go away after restart.
Options (when delete fails in the middle)
- Complete the partial delete: edit log the partial delete and remove inodes and blocks.
- Somehow undo the partial delete.
- Check quota for snapshot diff beforehand for the whole subtree.
- Ignore quota check during delete even if snapshot is present.