Microsoft Azure Service Fabric SDK Release Notes

SDK Version 2.1.163
Runtime Version 5.1.163
Tools Version 1.1.40531.2 (unchanged)

This is a bug fix-only refresh of the Service Fabric SDK. It includes resolutions to the issues described below.

Service Fabric Runtime

Fixed a bug where if data were paged out of the reliable collections then under certain conditions the default values for types within that data would be returned when read back out of the collections rather than the actual data

In the 5.1 runtime release, we introduced behavior where values stored in ReliableDictionary would be paged out of memory and kept only on disk. Under some conditions when those values were requested the collections would incorrectly return the default values for the types contained in that data types rather than the actual values in certain conditions. For example,ints would always be set to 0, strings to null, etc.

Below are specifically the APIs which were effected and the behavior that would be observed prior to this release.

- IReliableDictionaryTKey, TValue>

o AddOrUpdateAsync overloads that take in a functions would pass in default(TValue) in to the function instead of the actual value

 Task<TValue> AddOrUpdateAsync(ITransactiontx, TKey key, FuncTKey, TValue> addValueFactory, FuncTKey, TValue, TValue> updateValueFactory);

 Task<TValue> AddOrUpdateAsync(ITransactiontx, TKey key, FuncTKey, TValue> addValueFactory, FuncTKey, TValue, TValue> updateValueFactory, TimeSpan timeout, CancellationTokencancellationToken);

 Task<TValue> AddOrUpdateAsync(ITransactiontx, TKey key, TValue addValue,FuncTKey, TValue, TValue> updateValueFactory);

 Task<TValue> AddOrUpdateAsync(ITransactiontx, TKey key, TValue addValue,FuncTKey, TValue, TValue> updateValueFactory, TimeSpan timeout, CancellationTokencancellationToken);

o TryUpdateAsync overloads that took comparisonValue would sometimes compare against default(TValue) instead of the actual value.

 Task<bool> TryUpdateAsync(ITransactiontx, TKey key, TValue newValue, TValue comparisonValue);

 Task<bool> TryUpdateAsync(ITransactiontx, TKey key, TValue newValue, TValue comparisonValue, TimeSpan timeout, CancellationTokencancellationToken);

o TryRemoveAsync would sometimes return default(TValue) instead of the actual value

 TaskConditionalValue<TValue> TryRemoveAsync(ITransactiontx, TKey key);

 TaskConditionalValue<TValue> TryRemoveAsync(ITransactiontx, TKey key, TimeSpan timeout, CancellationTokencancellationToken);

- IReliableQueue<T>

o TryDequeueAsync would sometimes return default(TValue) instead of the actual dequeued value.

 TaskConditionalValue<T> TryDequeueAsync(ITransactiontx);

 TaskConditionalValue<T> TryDequeueAsync(ITransactiontx, TimeSpan timeout, CancellationTokencancellationToken);

Fixed issues with the Move-Replica command's behavior and its behavior when timing out

If the replica in question is already reconfiguring when a command timeout is hit, the command will return Reconfiguration Pending. If the move replica command is accepted, then the command will return successfully without waiting for the actual movement to complete.

Fixed a bug where updating a service description for a stateless service would not correctly change the service's default load for a metric

Previously the command would succeed but the changed value would not take effect.

Fixed various bugs where replicas would get stuck in different states due to issues at the stateful logging level.

Previously under certain conditions (races and exceptions when creating replicas and certain races when removing individual replicas), services utilizing the reliable collections could get stuck either when being deleted or when first being created. These cases have now been solved.

Fixed a bug with the behavior of QuorumLossWaitDuration

Previously setting this property for a service to anything other than the default value would cause offline replicas to be dropped immediately rather than waiting for the Quorum Loss Wait Duration to expire first.

Service Fabric SDK and NuGet packages

ServicePartitionClient, ActorProxy, and ServiceProxy become unusable after a period of time

Unhandled exceptions inside ServicePartitionClient's service resolution loop would cause it to stop functioning correctly, affecting other components that use ServicePartitionClient, such as ActorProxy and ServiceProxy. This patch fixes this bug so that ServicePartitionClient, ActorProxy, and ServiceProxy continue to work even after unhandled service resolution exceptions.

Unhandled exceptions in overrides of OnOpenAsync on StatefulService would cause permanent replica open failures

When overriding OnOpenAsync in a service class that derives from StatefulService, any unhandled exception in the override would cause the Reliable Collection replicated log to not close properly, causing subsequent replica open operations to fail. This patch fixes this bug so that the replicated log is closed properly even during exceptions thrown in overrides of OnOpenAsync.

Visual Studio Tools for Service Fabric

No updates

Microsoft Download Center Links

We recommend using the Web Platform Installer (UI or command line) to acquire the Service Fabric SDK. However, the direct links to the Runtime, SDK, and tools associated with this release are provided below should you need them. Note that these components must always be installed in that order (runtime, SDK, tools).

Runtime:

SDK:

Tools (unchanged):