bshashikant commented on a change in pull request #2165:
URL: https://github.com/apache/hadoop/pull/2165#discussion_r461996564



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/snapshot/SnapshotManager.java
##########
@@ -382,6 +395,14 @@ public void deleteSnapshot(final INodesInPath iip, final 
String snapshotName,
             EnumSet.of(XAttrSetFlag.CREATE, XAttrSetFlag.REPLACE));
         return;
       }
+

Review comment:
       I agree with @szetszwo here. If the user follows the order of deletion, 
it doesn't make sense to delay it further by pushing it to a background thread. 
Snapshot deletion is still happening by the same code path in SnapshotManager 
but the triggers are different.
   
   SnapshotDeletiongc as well as User deleteSnapshotOperation directly calls 
FsDirSnapshot#deleteSnapshot() which eventually calls SnapshotManger function 
while Replay of edits will directly call SnapshotManager#deleteSnapshot 
bypassing all the checks. So, essentially every deletion in the system won't be 
taking the exact path.




----------------------------------------------------------------
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.

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