jianghuazhu commented on PR #3376:
URL: https://github.com/apache/hadoop/pull/3376#issuecomment-1198838825

   Thanks @prasad-acit .
   I have read your update carefully, here are some of my personal insights:
   1. We should hold child locks in FSDirDeleteOp, here are some of my 
suggestions.
   `FSDirDeleteOp#deleteInternal() {
   ''''''
       fsd.getINodeMap().latchWriteLock(iip.getExistingINodes(), new INode[]{});
       fsn.removeLeasesAndINodes(removedUCFiles, removedINodes, true);
   ''''''
   }
   `
   At this stage, the deleteInternal() operation may be safer, and when FGL 
becomes more mature, it can be processed more fine-grained.
   2. Adding hasWriteLock() to PartitionedGSet may still fail to accurately 
capture each Partition and lock. Because the elements saved in PartitionedGSet 
will be repeated and distributed in different Partitions.
   3. It seems unnecessary to add hasWriteLock() and latchWriteLock() to 
INodeMap because latchWriteLock(INodesInPath iip, INode[] missing) already 
exists.
   
   Also, regarding the child lock issue you mentioned, I think it's a matter of 
concern. I'll submit some PRs later.
   Welcome to the discussion, @prasad-acit .


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to