Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #192 from WindowsAzure/dev

Storage updates for 2.0.5.1
  • Loading branch information...
commit 356c9f1680e09a2aded9ea41e6b82d95a0e7f7e3 2 parents 57dae66 + 4a60b4a
@jeffwilcox jeffwilcox authored
View
12 README.md
@@ -1,4 +1,4 @@
-<h1>Windows Azure SDK for Windows 8 and .NET 4 (2.0.2)</h1>
+<h1>Windows Azure SDK for Windows 8 and .NET 4 (2.0.5.1)</h1>
<p>This SDK allows you to build Windows Azure applications that take advantage of
Azure scalable cloud computing resources: table and blob storage, messaging through
Service Bus, distributed caching through cache.</p>
@@ -41,7 +41,7 @@ within your project you can also have them installed by the .NET package manager
<ul>
<li>Account: To use this SDK to call Windows Azure services, you need to first
create an account.</li>
- <li>Hosting: To host your .Net code in Windows Azure, you additionally need
+ <li>Hosting: To host your .NET code in Windows Azure, you additionally need
to download the full Windows Azure SDK for .NET - which includes packaging,
emulation, and deployment tools.</li>
<li>Windows 8 or .NET Framework 4.0</li>
@@ -49,12 +49,12 @@ within your project you can also have them installed by the .NET package manager
<h2>Dependencies</h2>
<p>
-The 2.0.2 version depends on three libraries (collectively referred to as ODataLib), which are resolved through the ODataLib (version 5.0.2) packages available through NuGet and not the WCF Data Services installer which currently contains 5.0.0 versions.
+This version depends on three libraries (collectively referred to as ODataLib), which are resolved through the ODataLib (version 5.2.0) packages available through NuGet and not the WCF Data Services installer which currently contains 5.0.0 versions.
The ODataLib libraries can be downloaded directly or referenced by your code project through NuGet.
The specific ODataLib packages are:<br/>
-http://nuget.org/packages/Microsoft.Data.OData/5.0.2<br/>
-http://nuget.org/packages/Microsoft.Data.Edm/5.0.2<br/>
-http://nuget.org/packages/System.Spatial/5.0.2<br/>
+http://nuget.org/packages/Microsoft.Data.OData/5.2.0<br/>
+http://nuget.org/packages/Microsoft.Data.Edm/5.2.0<br/>
+http://nuget.org/packages/System.Spatial/5.2.0<br/>
</p>
<h2>Code Samples</h2>
View
2  microsoft-azure-api/Services/Storage/Lib/Common/Shared/Protocol/Constants.cs
@@ -605,7 +605,7 @@ internal class HeaderConstants
/// <summary>
/// Specifies the value to use for UserAgent header.
/// </summary>
- public const string UserAgentProductVersion = "2.0.5";
+ public const string UserAgentProductVersion = "2.0.5.1";
/// <summary>
/// Master Windows Azure Storage header prefix.
View
2  microsoft-azure-api/Services/Storage/Lib/DotNet40/Properties/AssemblyInfo.cs
@@ -36,7 +36,7 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.0.0")]
-[assembly: AssemblyFileVersion("2.0.5.0")]
+[assembly: AssemblyFileVersion("2.0.5.1")]
#if SIGN
[assembly: InternalsVisibleTo(
View
4 microsoft-azure-api/Services/Storage/Lib/DotNet40/WindowsAzure.Storage.nuspec
@@ -2,13 +2,13 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>WindowsAzure.Storage</id>
- <version>2.0.5.0</version>
+ <version>2.0.5.1</version>
<title>Windows Azure Storage</title>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<licenseUrl>http://go.microsoft.com/fwlink/?LinkId=235170</licenseUrl>
<projectUrl>http://go.microsoft.com/fwlink/?LinkId=235168</projectUrl>
- <iconUrl>http://www.gravatar.com/avatar/c24270713c524575b0308e05c7e9ff61?s=128</iconUrl>
+ <iconUrl>http://go.microsoft.com/fwlink/?LinkID=288890</iconUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<description>This client library enables working with the Windows Azure storage services which include the blob service for storing binary and text data, the table service for storing structured non-relational data, and the queue service for storing messages that may be accessed by a client.
For this release see notes - http://msdn.microsoft.com/en-us/library/windowsazure/jj721952.aspx
View
28 microsoft-azure-api/Services/Storage/Lib/DotNetCommon/Core/Executor/Executor.cs
@@ -18,6 +18,7 @@
namespace Microsoft.WindowsAzure.Storage.Core.Executor
{
using System;
+ using System.IO;
using System.Net;
using System.Threading;
using Microsoft.WindowsAzure.Storage.Core.Util;
@@ -256,10 +257,15 @@ private static void BeginGetResponse<T>(ExecutionState<T> executionState)
CheckCancellation(executionState);
// 8. (Potentially reads stream from server)
- if (executionState.RestCMD.RetrieveResponseStream && executionState.ExceptionRef == null)
+ if (executionState.ExceptionRef == null)
{
executionState.RestCMD.ResponseStream = executionState.Resp.GetResponseStream();
+ if (!executionState.RestCMD.RetrieveResponseStream)
+ {
+ executionState.RestCMD.DestinationStream = Stream.Null;
+ }
+
if (executionState.RestCMD.DestinationStream != null)
{
if (executionState.RestCMD.StreamCopyState == null)
@@ -311,6 +317,19 @@ private static void BeginGetResponse<T>(ExecutionState<T> executionState)
private static void EndResponseStreamCopy<T>(ExecutionState<T> executionState)
{
+ try
+ {
+ if (executionState.RestCMD.ResponseStream != null)
+ {
+ executionState.RestCMD.ResponseStream.Dispose();
+ executionState.RestCMD.ResponseStream = null;
+ }
+ }
+ catch (Exception)
+ {
+ // no-op, because HttpWebResponse.Close should take care of it
+ }
+
EndOperation(executionState);
}
#endregion
@@ -492,9 +511,11 @@ public static T ExecuteSync<T>(StorageCommandBase<T> cmd, IRetryPolicy policy, O
}
// 8. (Potentially reads stream from server)
- if (executionState.RestCMD.RetrieveResponseStream)
+ executionState.RestCMD.ResponseStream = executionState.Resp.GetResponseStream();
+
+ if (!executionState.RestCMD.RetrieveResponseStream)
{
- executionState.RestCMD.ResponseStream = executionState.Resp.GetResponseStream();
+ executionState.RestCMD.DestinationStream = Stream.Null;
}
if (executionState.RestCMD.DestinationStream != null)
@@ -511,6 +532,7 @@ public static T ExecuteSync<T>(StorageCommandBase<T> cmd, IRetryPolicy policy, O
finally
{
executionState.RestCMD.ResponseStream.Dispose();
+ executionState.RestCMD.ResponseStream = null;
}
}
View
34 microsoft-azure-api/Services/Storage/Lib/RT/Core/Executor/Executor.cs
@@ -18,6 +18,7 @@
namespace Microsoft.WindowsAzure.Storage.Core.Executor
{
using System;
+ using System.IO;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
@@ -124,20 +125,29 @@ public static Task<T> ExecuteAsync<T>(RESTCommand<T> cmd, IRetryPolicy policy, O
}
// 8. (Potentially reads stream from server)
- if (cmd.RetrieveResponseStream)
+ cmd.ResponseStream = await executionState.Resp.Content.ReadAsStreamAsync();
+
+ if (!cmd.RetrieveResponseStream)
{
- cmd.ResponseStream = await executionState.Resp.Content.ReadAsStreamAsync();
+ cmd.DestinationStream = Stream.Null;
}
if (cmd.DestinationStream != null)
{
- if (cmd.StreamCopyState == null)
+ try
{
- cmd.StreamCopyState = new StreamDescriptor();
- }
+ if (cmd.StreamCopyState == null)
+ {
+ cmd.StreamCopyState = new StreamDescriptor();
+ }
- await cmd.ResponseStream.WriteToAsync(cmd.DestinationStream, null /* MaxLength */, cmd.CalculateMd5ForResponseStream, executionState.OperationContext, cmd.StreamCopyState, tokenWithTimeout);
- cmd.ResponseStream.Dispose();
+ await cmd.ResponseStream.WriteToAsync(cmd.DestinationStream, null /* MaxLength */, cmd.CalculateMd5ForResponseStream, executionState.OperationContext, cmd.StreamCopyState, tokenWithTimeout);
+ }
+ finally
+ {
+ cmd.ResponseStream.Dispose();
+ cmd.ResponseStream = null;
+ }
}
// 9. Evaluate Response & Parse Results, (Stream potentially available here)
@@ -175,6 +185,14 @@ public static Task<T> ExecuteAsync<T>(RESTCommand<T> cmd, IRetryPolicy policy, O
delay = delay.TotalMilliseconds < 0 || delay > Constants.MaximumRetryBackoff ? Constants.MaximumRetryBackoff : delay;
}
+ finally
+ {
+ if (executionState.Resp != null)
+ {
+ executionState.Resp.Dispose();
+ executionState.Resp = null;
+ }
+ }
// potentially backoff
if (!shouldRetry || (executionState.OperationExpiryTime.HasValue && (DateTime.Now + delay).CompareTo(executionState.OperationExpiryTime.Value) > 0))
@@ -200,7 +218,7 @@ public static Task<T> ExecuteAsync<T>(RESTCommand<T> cmd, IRetryPolicy policy, O
await Task.Delay(delay);
}
}
- }
+ }
while (shouldRetry);
// should never get here
View
2  microsoft-azure-api/Services/Storage/Lib/RT/Properties/AssemblyInfo.cs
@@ -26,7 +26,7 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.0.0")]
-[assembly: AssemblyFileVersion("2.0.5.0")]
+[assembly: AssemblyFileVersion("2.0.5.1")]
[assembly: ComVisible(false)]
#if SIGN
[assembly: InternalsVisibleTo(
View
2  microsoft-azure-api/Services/Storage/Lib/RTTable/Properties/AssemblyInfo.cs
@@ -25,5 +25,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.0.0")]
-[assembly: AssemblyFileVersion("2.0.5.0")]
+[assembly: AssemblyFileVersion("2.0.5.1")]
[assembly: ComVisible(false)]
View
2  microsoft-azure-api/Services/Storage/Test/Unit/DotNet40/Properties/AssemblyInfo.cs
@@ -33,4 +33,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.0.0")]
-[assembly: AssemblyFileVersion("2.0.5.0")]
+[assembly: AssemblyFileVersion("2.0.5.1")]
View
2  microsoft-azure-api/Services/Storage/Test/Unit/RT/Properties/AssemblyInfo.cs
@@ -25,4 +25,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.0.0")]
-[assembly: AssemblyFileVersion("2.0.5.0")]
+[assembly: AssemblyFileVersion("2.0.5.1")]
View
12 microsoft-azure-api/Services/Storage/changelog.txt
@@ -12,7 +12,7 @@ Issues fixed in 2.0.2 :
Issues fixed in 2.0.3 :
- 1. All: General metadata correctness test fails when using the RT library to develop windows store apps
+ 1. All (RT): General metadata correctness test fails when using the RT library to develop windows store apps
2. Queues: CloudQueueMessage.MaxNumberOfMessagesToPeek, CloudQueueMessage.MaxMessageSize and CloudQueueMessage.MaximumTimeToLive have disappeared from CloudQueueMessage
3. Queues: CloudQueue.BeginCreateIfNotExists and CloudQueue.BeginDeleteIfExists methods expect valid options argument
4. Tables: When one or more of the batches fails, but then succeeds on a retry, the "extra" TableResults of the failed transactions are also returned
@@ -21,6 +21,7 @@ Issues fixed in 2.0.3 :
7. Tables: CloudTable.EndListTablesSegmented method does not work correctly
Issues fixed in 2.0.4 :
+
1. All: Flush HttpWebRequest's request stream before calling BeginGetResponse
2. All: Support Null Retry Policies
3. Blob: Continue ListContainers parsing if a container property is unknown
@@ -30,10 +31,12 @@ Issues fixed in 2.0.4 :
7. Tables: Allow String.Empty in TableQuery Filters
Issues fixed in 2.0.4.1 :
+
1. All: Updated Odata dependency to latest and also changed nuspec to allow any version >= 5.2.0
Issues fixed in 2.0.5 :
- 1. All: StorageException is now serializable. Also, other useful objects for debugging(StorageExtendedErrorInformation and RequestResult) are also serializable
+
+ 1. All: StorageException is now serializable. Also, other useful objects for debugging (StorageExtendedErrorInformation and RequestResult) are also serializable
2. All: SharedAccessSignature helper now uses culture invariant characteristics to calculate SAS
3. All: CloudStorageAccount can now parse connection strings with extra blank values
4. All: OperationContext StartTime and EndTime are now populated during execution
@@ -50,4 +53,7 @@ Issues fixed in 2.0.5 :
15. Queue: Ability to recreate CloudQueueMessage with Message Id and Pop Receipt
16. Table: Exceptions during TableBatchOperation now parse the entity index from the server response
17. Table: Floating-point number filter is now generated using invariant culture
-
+
+Issues fixed in 2.0.5.1 :
+
+ 1. All: Make sure the response stream is drained to prevent socket exhaustion

0 comments on commit 356c9f1

Please sign in to comment.
Something went wrong with that request. Please try again.