[ https://issues.apache.org/jira/browse/HDFS-4150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13491260#comment-13491260 ]
Jing Zhao commented on HDFS-4150: --------------------------------- Nicholas and Aaron, thanks for the comments! Have uploaded the initial patch for refactoring INode#collectSubtreeBlocksAndClear in HDFS-4152. Will upload a new patch addressing Nicholas's comments after HDFS-4152 going through. To address Aaron's comments, I will also add more comments explaining why replacing the BlockCollection in the blocksMap. I have also rechecked the code and verified that the same BlockCollection/INode reference is used in both blocksMap and FSDirectory tree. > Update inode in blocksMap when deleting original/snapshot file > -------------------------------------------------------------- > > Key: HDFS-4150 > URL: https://issues.apache.org/jira/browse/HDFS-4150 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: data-node, name-node > Reporter: Jing Zhao > Assignee: Jing Zhao > Attachments: HDFS-4150.000.patch, HDFS-4150.001.patch, > HDFS-4150.002.patch > > > When deleting a file/directory, instead of directly removing all the > corresponding blocks, we should update inodes in blocksMap if there are > snapshots for them. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira