TestabilityExtensions.MoveSecondaryAsync Method (FabricClient.ServiceManagementClient, PartitionSelector, CancellationToken)

 

Moves selected secondary replica from current node to new node in the cluster.

Namespace:   System.Fabric.Testability
Assembly:  System.Fabric.Testability (in System.Fabric.Testability.dll)

Syntax

public static Task<MoveSecondaryResult> MoveSecondaryAsync(
    this FabricClient.ServiceManagementClient serviceManagementClient,
    PartitionSelector partitionSelector,
    CancellationToken token
)

Parameters

Return Value

Type: System.Threading.Tasks.Task<MoveSecondaryResult>

A task with move secondary result

Exceptions

Exception Condition
TimeoutException

Retry is exhausted.

InvalidOperationException

Invalid operation - If action called on stateless service. - If no active secondary replica exists - If not enough nodes available for action

FabricException

FabricErrorCode.AlreadyPrimaryReplica - If Primary replica for selected partition already exist on new node FabricErrorCode.AlreadySecondaryReplica - If active Secondary replica for selected partition already exist on new node FabricErrorCode.InvalidReplicaStateForReplicaOperation - If Current Secondary node is not a secondary replica FabricErrorCode.ConstraintNotSatisfied - If the constraints for the new location of the replica would prohibit the move

Remarks

This API overload randomly selects current secondary node for random secondary replica of the selected partition and new secondary node for replica movement This selected replica will be moved to new node location from current node location. This API is safe i.e. it will not cause quorum or data loss by itself unless additional faults or failures happen at the same time.

See Also

MoveSecondaryAsync Overload
TestabilityExtensions Class
System.Fabric.Testability Namespace

Return to top