microsoft / AzureStorageExplorer

Easily manage the contents of your storage account with Azure Storage Explorer. Upload, download, and manage blobs, files, queues, tables, and Cosmos DB entities. Gain easy access to manage your virtual machine disks. Work with either Azure Resource Manager or classic storage accounts, plus manage and configure cross-origin resource sharing (CORS) rules.
Creative Commons Attribution 4.0 International
371 stars 85 forks source link

Offer include snapshots for Gen2 containers #7442

Open MRayermannMSFT opened 11 months ago

MRayermannMSFT commented 11 months ago

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.

JasonYeMSFT commented 10 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.