Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty folder not deleted #7694

Closed
3 tasks done
gison93 opened this issue Jan 22, 2024 · 4 comments
Closed
3 tasks done

Empty folder not deleted #7694

gison93 opened this issue Jan 22, 2024 · 4 comments
Labels
⚙️ adls gen2 Related to hierarchical namespaces (ADLS Gen 2) ✅ by design Issue is intentional (not a bug) ✅ mitigated Has been resolved or has known workaround

Comments

@gison93
Copy link

gison93 commented Jan 22, 2024

Preflight Checklist

Storage Explorer Version

1.32.1

Regression From

No response

Architecture

x64

Storage Explorer Build Number

20231114.10

Platform

Windows

OS Version

Windows 10

Bug Description

When deleting all the files within a folder, the folder does not get deleted.

Steps to Reproduce

  1. Launch Azure Storage Explorer
  2. Create a folder
  3. Upload a file in it
  4. Delete the file

Actual Experience

When deleting all the files within a folder, the folder does not get deleted.

Expected Experience

When deleting all the files within a folder, the folder (now empty) is deleted.

Additional Context

No response

@MRayermannMSFT
Copy link
Member

@gison93 why are you expecting that the folder will be deleted if empty? Can you share what storage service you are working with?

  • Blob (non ADLS Gen2)
  • Blob (ADLS Gen2)
  • Files

@gison93
Copy link
Author

gison93 commented Jan 22, 2024

@MRayermannMSFT it's ADLS Gen2. I expected that way because in the past I got this behavior. Actually I tested it on a non ADLS Gen2 and I got the behavior that I expected.

Is there a way to enable the functionality?

@MRayermannMSFT
Copy link
Member

MRayermannMSFT commented Jan 22, 2024

@gison93 so one of the things you get when you create an ADLS Gen2 storage account is hierarchical directory structure for the data in your blob containers.

The hierarchical namespace is a key feature that enables Azure Data Lake Storage Gen2 to provide high-performance data access at object storage scale and price. You can use this feature to organize all the objects and files within your storage account into a hierarchy of directories and nested subdirectories. In other words, your Azure Data Lake Storage Gen2 data is organized in much the same way that files are organized on your computer.

From: https://learn.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-introduction#hierarchical-directory-structure

This means that unlike non-ADLS Gen2 storage accounts, the folders in your blob containers are real (not virutal). The reason empty folders disappear in a non-ADLS Gen2 blob container disappear is because they are virtual, so without any blobs whose names define the existance of a folder, that folder does not exist. But for ADLS Gen2 blob containers, once you create a folder, it will not go away until you delete it.

Does that make sense?

@MRayermannMSFT MRayermannMSFT added ✅ by design Issue is intentional (not a bug) ⚙️ adls gen2 Related to hierarchical namespaces (ADLS Gen 2) labels Jan 22, 2024
@gison93
Copy link
Author

gison93 commented Jan 23, 2024

I missed that info, thank you for the explanation!

@gison93 gison93 closed this as completed Jan 23, 2024
@MRayermannMSFT MRayermannMSFT added the ✅ mitigated Has been resolved or has known workaround label Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ adls gen2 Related to hierarchical namespaces (ADLS Gen 2) ✅ by design Issue is intentional (not a bug) ✅ mitigated Has been resolved or has known workaround
Projects
None yet
Development

No branches or pull requests

2 participants