Open MRayermannMSFT opened 11 months ago
This feature doesn't seem to be feasible at this point. Using the blob endpoint to delete HNS enabled blobs will significantly alter AzCopy behavior and carries some undesirable side effects. For example, when deleting a single directory that contains 2 blobs:
DFS endpoint behavior:
Blob endpoint behavior:
AzCopy will make a lot of unnecessary requests if the directory has many files in it. The problem can get even worse when soft delete is enabled. After deleting the directory using DFS endpoint, all the files in it are associated with the deleted directory. Undeleting the directory will recover them. However, after deleting the directory using Blob endpoint, the files in it are considered deleted independently and thus won't be recovered by undeleting the directory.
When we delete a blobs/folders in Gen2, we invoke AzCopy such that it uses the DFS delete API. It appears that this API does not support "include snapshots". Therefore, if we are going to offer "include snapshots" when deleting things in Gen2, we need to swap to invoking AzCopy such that it uses the Blob delete API.