Reputation: 3571
I have code like this
BlobDownloadInfo blob = Client.GetBlockBlobClient(filePath).Download().Value;
...
Client.GetBlockBlobClient(filePath).DeleteIfExists();
And DeleteIfExists() reliably takes 00:01:42 (about 100 seconds) to delete my blob. Why?
Upvotes: 0
Views: 291
Reputation: 3571
BlobDownloadInfo
is an IDisposable
. By not disposing it, we appear to be keeping open the connection and forcing DeleteIfExists()
to wait for that connection to timeout. Updating the code to
using (BlobDownloadInfo blob = Client.GetBlockBlobClient(filePath).Download().Value)
causes DeleteIfExists()
to return in about 00:00:00.15
Upvotes: 2