我们试图知道blob是否存在,所以我们正在做一个FetchAttributes。它运行良好,但在负载测试中,在数千个请求中,有两个请求在此方法中失败。
错误是 blob引用的BlobType与blob的BlobType不匹配。
blob存在。
您知道此方法的SDK 1.7中是否存在错误吗?
这是代码,已恢复。谢谢。
CloudStorageAccount cloudStorageAccount;
CloudStorageAccount.SetConfigurationSettingPublisher(
(configName, configSettingPublisher) => configSettingPublisher(serviceName));
cloudStorageAccount = CloudStorageAccount.Parse(
string.Format("DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1}", accountName, accountKey));
BlobConnection blobConn =
new BlobConnection(GeneralConstants.GetValue(GeneralConstantsEnum.BlobPersistance), identity);
blobClient = this.Account.CreateCloudBlobClient();
blobContainer = blobClient.GetContainerReference(blobContainerName);
blobContainer.GetBlobReference(blobName);
CloudBlob blob = blobContainer.GetBlobReference(blobName);
blob.FetchAttributes(); //Throws the exception
operation = blob.Metadata["operation"];
productId = blob.Metadata["productId"];
clientId = blob.Metadata["clientId"];
workOrders = blob.DownloadText();