Azure / azure-media-migration

Azure Media Migration Tool
https://github.com/Azure/azure-media-migration
MIT License
10 stars 13 forks source link

GetStorageAccountAsync is making a Storage Account management API cal… #238

Closed srayan closed 4 months ago

srayan commented 4 months ago

GetStorageAccountAsync was making a Storage Account management API call, these calls are restricted at 800 requests / 5 minutes. This threshold is different from calls made to the storage account data plane to fetch blobs/containers et.al. and those have a much higher threshold.

My fix basically constructs the same BlobSvc client by obtaining the storage account name from the asset property itself and then I reuse it through a concurrent dictionary (for thread safety).

Here is the list of Storage account management APIs that are subject to that 800 requests / 5 mins throttling limit - https://learn.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations#microsoftstorage