Bumping up the AzureStorage version to 8.0.1 and addressing a storage issue. (#92)

* Bumping up the AzureStorage version to 8.0.1 and temporarily working around an issue due to storage bug.

* .

* Removing redundant CBD parameter.

* .
This commit is contained in:
Serkant Karaca 2017-01-23 08:41:08 -08:00 коммит произвёл GitHub
Родитель 260c61ef9b
Коммит ceda3fec37
2 изменённых файлов: 17 добавлений и 3 удалений

Просмотреть файл

@ -206,7 +206,8 @@ namespace Microsoft.Azure.EventHubs.Processor
{
AzureBlobLease retval = null;
CloudBlockBlob leaseBlob = this.consumerGroupDirectory.GetBlockBlobReference(partitionId);
CloudBlockBlob leaseBlob = GetBlockBlobReference(partitionId);
if (await leaseBlob.ExistsAsync().ConfigureAwait(false))
{
retval = await DownloadLeaseAsync(partitionId, leaseBlob).ConfigureAwait(false);
@ -232,7 +233,7 @@ namespace Microsoft.Azure.EventHubs.Processor
AzureBlobLease returnLease;
try
{
CloudBlockBlob leaseBlob = this.consumerGroupDirectory.GetBlockBlobReference(partitionId);
CloudBlockBlob leaseBlob = GetBlockBlobReference(partitionId);
returnLease = new AzureBlobLease(partitionId, leaseBlob);
string jsonLease = JsonConvert.SerializeObject(returnLease);
@ -470,5 +471,18 @@ namespace Microsoft.Azure.EventHubs.Processor
}
return retval;
}
CloudBlockBlob GetBlockBlobReference(string partitionId)
{
CloudBlockBlob leaseBlob = this.consumerGroupDirectory.GetBlockBlobReference(partitionId);
// GetBlockBlobReference creates a new ServiceClient thus resets options.
// Because of this we lose settings like MaximumExecutionTime on the client.
// Until storage addresses the issue we need to override it here once more.
// Tracking bug: https://github.com/Azure/azure-storage-net/issues/398
leaseBlob.ServiceClient.DefaultRequestOptions = this.storageClient.DefaultRequestOptions;
return leaseBlob;
}
}
}

Просмотреть файл

@ -23,7 +23,7 @@
"target": "project"
},
"Newtonsoft.Json": "9.0.1",
"WindowsAzure.Storage": "7.2.1"
"WindowsAzure.Storage": "8.0.1"
},
"frameworks": {