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?
BlobDownloadInfo
is anIDisposable
. By not disposing it, we appear to be keeping open the connection and forcingDeleteIfExists()
to wait for that connection to timeout. Updating the code tocauses
DeleteIfExists()
to return in about 00:00:00.15