Share via


FabricClient.FaultManagementClient.MovePrimaryAsync Method

Definition

Overloads

MovePrimaryAsync(String, PartitionSelector, Boolean, TimeSpan, CancellationToken)

Moves selected primary replica to new node in the cluster.

MovePrimaryAsync(String, PartitionSelector, TimeSpan, CancellationToken)

Moves selected primary replica to new node in the cluster.

MovePrimaryAsync(String, PartitionSelector, Boolean, CancellationToken)

Moves selected primary replica to new node in the cluster.

MovePrimaryAsync(PartitionSelector, Boolean, TimeSpan, CancellationToken)

Moves selected primary replica to new node in the cluster.

MovePrimaryAsync(String, PartitionSelector, CancellationToken)

Moves selected primary replica to new node in the cluster.

MovePrimaryAsync(String, PartitionSelector, Boolean)

Moves selected primary replica to new node in the cluster.

MovePrimaryAsync(PartitionSelector, TimeSpan, CancellationToken)

Moves selected primary replica to new node in the cluster.

MovePrimaryAsync(String, PartitionSelector)

Moves selected primary replica to new node in the cluster.

MovePrimaryAsync(PartitionSelector, CancellationToken)

Moves selected primary replica to new node in the cluster.

MovePrimaryAsync(PartitionSelector, Boolean)

Moves selected primary replica to new node in the cluster.

MovePrimaryAsync(PartitionSelector)

Moves selected primary replica to new node in the cluster.

MovePrimaryAsync(PartitionSelector, Boolean, CancellationToken)

Moves selected primary replica to new node in the cluster.

MovePrimaryAsync(String, PartitionSelector, Boolean, TimeSpan, CancellationToken)

Moves selected primary replica to new node in the cluster.

public System.Threading.Tasks.Task<System.Fabric.Result.MovePrimaryResult> MovePrimaryAsync (string nodeName, System.Fabric.PartitionSelector partitionSelector, bool ignoreConstraints, TimeSpan operationTimeout, System.Threading.CancellationToken token);
member this.MovePrimaryAsync : string * System.Fabric.PartitionSelector * bool * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Fabric.Result.MovePrimaryResult>
Public Function MovePrimaryAsync (nodeName As String, partitionSelector As PartitionSelector, ignoreConstraints As Boolean, operationTimeout As TimeSpan, token As CancellationToken) As Task(Of MovePrimaryResult)

Parameters

nodeName
String

Node name where primary replica to be moved

partitionSelector
PartitionSelector

Move primary will be called on this Selected Partition. API uses the primary replica of the selected partition to move to new node location.

ignoreConstraints
Boolean

Whether or not to ignore constraints when attempting to execute the move.

operationTimeout
TimeSpan

The timeout for this API call.

token
CancellationToken

The cancellation token

Returns

A task with move primary result

Exceptions

Retry is exhausted.

Invalid operation - If action called on stateless service. - If not enough nodes available for action

FabricErrorCode.NotReady - If Primary replica is not ready for movement FabricErrorCode.AlreadyPrimaryReplica - If Primary replica for selected partition already exist on new node FabricErrorCode.ConstraintNotSatisfied - If the constraints for the new location of the replica would prohibit the move FabricErrorCode.AsyncOperationNotComplete - Services are temporarily in a torn aligned affinity state

Remarks

API uses the primary replica of the selected partition to move to new node location specified by nodeName. 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. Starting with Service Fabric 7.1, **Move-ServiceFabricPrimaryReplica** takes aligned affinity into consideration. If the primary to be moved is a part of an aligned affinity relationship, then all replicas in that relationship will be moved together. If the primary replicas of such services are are not completely able to move within specified timeout, an exception will be thrown (FabricErrorCode.AsyncOperationNotComplete) indicating the services are temporarily in a torn aligned affinity state. To remediate, issue the operation again.

Applies to

MovePrimaryAsync(String, PartitionSelector, TimeSpan, CancellationToken)

Moves selected primary replica to new node in the cluster.

public System.Threading.Tasks.Task<System.Fabric.Result.MovePrimaryResult> MovePrimaryAsync (string nodeName, System.Fabric.PartitionSelector partitionSelector, TimeSpan operationTimeout, System.Threading.CancellationToken token);
member this.MovePrimaryAsync : string * System.Fabric.PartitionSelector * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Fabric.Result.MovePrimaryResult>
Public Function MovePrimaryAsync (nodeName As String, partitionSelector As PartitionSelector, operationTimeout As TimeSpan, token As CancellationToken) As Task(Of MovePrimaryResult)

Parameters

nodeName
String

Node name where primary replica to be moved

partitionSelector
PartitionSelector

Move primary will be called on this Selected Partition. API uses the primary replica of the selected partition to move to new node location.

operationTimeout
TimeSpan

The timeout for this API call.

token
CancellationToken

The cancellation token

Returns

A task with move primary result

Exceptions

Retry is exhausted.

Invalid operation - If action called on stateless service. - If not enough nodes available for action

FabricErrorCode.NotReady - If Primary replica is not ready for movement FabricErrorCode.AlreadyPrimaryReplica - If Primary replica for selected partition already exist on new node FabricErrorCode.ConstraintNotSatisfied - If the constraints for the new location of the replica would prohibit the move FabricErrorCode.AsyncOperationNotComplete - Services are temporarily in a torn aligned affinity state

Remarks

API uses the primary replica of the selected partition to move to new node location specified by nodeName. 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. Starting with Service Fabric 7.1, **Move-ServiceFabricPrimaryReplica** takes aligned affinity into consideration. If the primary to be moved is a part of an aligned affinity relationship, then all replicas in that relationship will be moved together. If the primary replicas of such services are are not completely able to move within specified timeout, an exception will be thrown (FabricErrorCode.AsyncOperationNotComplete) indicating the services are temporarily in a torn aligned affinity state. To remediate, issue the operation again.

Applies to

MovePrimaryAsync(String, PartitionSelector, Boolean, CancellationToken)

Moves selected primary replica to new node in the cluster.

public System.Threading.Tasks.Task<System.Fabric.Result.MovePrimaryResult> MovePrimaryAsync (string nodeName, System.Fabric.PartitionSelector partitionSelector, bool ignoreConstraints, System.Threading.CancellationToken token);
member this.MovePrimaryAsync : string * System.Fabric.PartitionSelector * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Fabric.Result.MovePrimaryResult>
Public Function MovePrimaryAsync (nodeName As String, partitionSelector As PartitionSelector, ignoreConstraints As Boolean, token As CancellationToken) As Task(Of MovePrimaryResult)

Parameters

nodeName
String

Node name where primary replica to be moved

partitionSelector
PartitionSelector

Move primary will be called on this Selected Partition.

ignoreConstraints
Boolean

Whether or not to ignore constraints when attempting to execute the move.

token
CancellationToken

The cancellation token

Returns

A task with move primary result

Exceptions

Retry is exhausted.

Invalid operation - If action called on stateless service. - If not enough nodes available for action

FabricErrorCode.NotReady - If Primary replica is not ready for movement FabricErrorCode.AlreadyPrimaryReplica - If Primary replica for selected partition already exist on new node FabricErrorCode.ConstraintNotSatisfied - If the constraints for the new location of the replica would prohibit the move FabricErrorCode.AsyncOperationNotComplete - Services are temporarily in a torn aligned affinity state

Remarks

API uses the primary replica of the selected partition to move to new node location specified by nodeName. 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. Starting with Service Fabric 7.1, **Move-ServiceFabricPrimaryReplica** takes aligned affinity into consideration. If the primary to be moved is a part of an aligned affinity relationship, then all replicas in that relationship will be moved together. If the primary replicas of such services are are not completely able to move within specified timeout, an exception will be thrown (FabricErrorCode.AsyncOperationNotComplete) indicating the services are temporarily in a torn aligned affinity state. To remediate, issue the operation again.

Applies to

MovePrimaryAsync(PartitionSelector, Boolean, TimeSpan, CancellationToken)

Moves selected primary replica to new node in the cluster.

public System.Threading.Tasks.Task<System.Fabric.Result.MovePrimaryResult> MovePrimaryAsync (System.Fabric.PartitionSelector partitionSelector, bool ignoreConstraints, TimeSpan operationTimeout, System.Threading.CancellationToken token);
member this.MovePrimaryAsync : System.Fabric.PartitionSelector * bool * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Fabric.Result.MovePrimaryResult>
Public Function MovePrimaryAsync (partitionSelector As PartitionSelector, ignoreConstraints As Boolean, operationTimeout As TimeSpan, token As CancellationToken) As Task(Of MovePrimaryResult)

Parameters

partitionSelector
PartitionSelector

Move primary will be called on this Selected Partition.

ignoreConstraints
Boolean

Whether or not to ignore constraints when attempting to execute the move.

operationTimeout
TimeSpan

The timeout for this API call.

token
CancellationToken

The cancellation token

Returns

A task with move primary result

Exceptions

Retry is exhausted.

Invalid operation - If action called on stateless service. - If not enough nodes available for action

FabricErrorCode.NotReady - If Primary replica is not ready for movement FabricErrorCode.AlreadyPrimaryReplica - If Primary replica for selected partition already exist on new node FabricErrorCode.ConstraintNotSatisfied - If the constraints for the new location of the replica would prohibit the move FabricErrorCode.AsyncOperationNotComplete - Services are temporarily in a torn aligned affinity state

Remarks

API uses the primary replica of the selected partition to move to new node location. This overload uses random node selected from current node list, where primary replica does not exist at the time of API call for moving primary replica. 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. Starting with Service Fabric 7.1, **Move-ServiceFabricPrimaryReplica** takes aligned affinity into consideration. If the primary to be moved is a part of an aligned affinity relationship, then all replicas in that relationship will be moved together. If the primary replicas of such services are are not completely able to move within specified timeout, an exception will be thrown (FabricErrorCode.AsyncOperationNotComplete) indicating the services are temporarily in a torn aligned affinity state. To remediate, issue the operation again.

Applies to

MovePrimaryAsync(String, PartitionSelector, CancellationToken)

Moves selected primary replica to new node in the cluster.

public System.Threading.Tasks.Task<System.Fabric.Result.MovePrimaryResult> MovePrimaryAsync (string nodeName, System.Fabric.PartitionSelector partitionSelector, System.Threading.CancellationToken token);
member this.MovePrimaryAsync : string * System.Fabric.PartitionSelector * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Fabric.Result.MovePrimaryResult>
Public Function MovePrimaryAsync (nodeName As String, partitionSelector As PartitionSelector, token As CancellationToken) As Task(Of MovePrimaryResult)

Parameters

nodeName
String

Node name where primary replica to be moved

partitionSelector
PartitionSelector

Move primary will be called on this Selected Partition.

token
CancellationToken

The cancellation token

Returns

A task with move primary result

Exceptions

Retry is exhausted.

Invalid operation - If action called on stateless service. - If not enough nodes available for action

FabricErrorCode.NotReady - If Primary replica is not ready for movement FabricErrorCode.AlreadyPrimaryReplica - If Primary replica for selected partition already exist on new node FabricErrorCode.ConstraintNotSatisfied - If the constraints for the new location of the replica would prohibit the move FabricErrorCode.AsyncOperationNotComplete - Services are temporarily in a torn aligned affinity state

Remarks

API uses the primary replica of the selected partition to move to new node location specified by nodeName. 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. Starting with Service Fabric 7.1, **Move-ServiceFabricPrimaryReplica** takes aligned affinity into consideration. If the primary to be moved is a part of an aligned affinity relationship, then all replicas in that relationship will be moved together. If the primary replicas of such services are are not completely able to move within specified timeout, an exception will be thrown (FabricErrorCode.AsyncOperationNotComplete) indicating the services are temporarily in a torn aligned affinity state. To remediate, issue the operation again.

Applies to

MovePrimaryAsync(String, PartitionSelector, Boolean)

Moves selected primary replica to new node in the cluster.

public System.Threading.Tasks.Task<System.Fabric.Result.MovePrimaryResult> MovePrimaryAsync (string nodeName, System.Fabric.PartitionSelector partitionSelector, bool ignoreConstraints);
member this.MovePrimaryAsync : string * System.Fabric.PartitionSelector * bool -> System.Threading.Tasks.Task<System.Fabric.Result.MovePrimaryResult>
Public Function MovePrimaryAsync (nodeName As String, partitionSelector As PartitionSelector, ignoreConstraints As Boolean) As Task(Of MovePrimaryResult)

Parameters

nodeName
String

Node name where primary replica to be moved

partitionSelector
PartitionSelector

Move primary will be called on this Selected Partition.

ignoreConstraints
Boolean

Whether or not to ignore constraints when attempting to execute the move.

Returns

A task with move primary result

Exceptions

Retry is exhausted.

Invalid operation - If action called on stateless service. - If not enough nodes available for action

FabricErrorCode.NotReady - If Primary replica is not ready for movement FabricErrorCode.AlreadyPrimaryReplica - If Primary replica for selected partition already exist on new node FabricErrorCode.ConstraintNotSatisfied - If the constraints for the new location of the replica would prohibit the move FabricErrorCode.AsyncOperationNotComplete - Services are temporarily in a torn aligned affinity state

Remarks

API uses the primary replica of the selected partition to move to new node location specified by nodeName. 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. Starting with Service Fabric 7.1, **Move-ServiceFabricPrimaryReplica** takes aligned affinity into consideration. If the primary to be moved is a part of an aligned affinity relationship, then all replicas in that relationship will be moved together. If the primary replicas of such services are are not completely able to move within specified timeout, an exception will be thrown (FabricErrorCode.AsyncOperationNotComplete) indicating the services are temporarily in a torn aligned affinity state. To remediate, issue the operation again.

Applies to

MovePrimaryAsync(PartitionSelector, TimeSpan, CancellationToken)

Moves selected primary replica to new node in the cluster.

public System.Threading.Tasks.Task<System.Fabric.Result.MovePrimaryResult> MovePrimaryAsync (System.Fabric.PartitionSelector partitionSelector, TimeSpan operationTimeout, System.Threading.CancellationToken token);
member this.MovePrimaryAsync : System.Fabric.PartitionSelector * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Fabric.Result.MovePrimaryResult>
Public Function MovePrimaryAsync (partitionSelector As PartitionSelector, operationTimeout As TimeSpan, token As CancellationToken) As Task(Of MovePrimaryResult)

Parameters

partitionSelector
PartitionSelector

Move primary will be called on this Selected Partition.

operationTimeout
TimeSpan

The timeout for this API call.

token
CancellationToken

The cancellation token

Returns

A task with move primary result

Exceptions

Retry is exhausted.

Invalid operation - If action called on stateless service. - If not enough nodes available for action

FabricErrorCode.NotReady - If Primary replica is not ready for movement FabricErrorCode.AlreadyPrimaryReplica - If Primary replica for selected partition already exist on new node FabricErrorCode.ConstraintNotSatisfied - If the constraints for the new location of the replica would prohibit the move FabricErrorCode.AsyncOperationNotComplete - Services are temporarily in a torn aligned affinity state

Remarks

API uses the primary replica of the selected partition to move to new node location. This overload uses random node selected from current node list, where primary replica does not exist at the time of API call for moving primary replica. 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. Starting with Service Fabric 7.1, **Move-ServiceFabricPrimaryReplica** takes aligned affinity into consideration. If the primary to be moved is a part of an aligned affinity relationship, then all replicas in that relationship will be moved together. If the primary replicas of such services are are not completely able to move within specified timeout, an exception will be thrown (FabricErrorCode.AsyncOperationNotComplete) indicating the services are temporarily in a torn aligned affinity state. To remediate, issue the operation again.

Applies to

MovePrimaryAsync(String, PartitionSelector)

Moves selected primary replica to new node in the cluster.

public System.Threading.Tasks.Task<System.Fabric.Result.MovePrimaryResult> MovePrimaryAsync (string nodeName, System.Fabric.PartitionSelector partitionSelector);
member this.MovePrimaryAsync : string * System.Fabric.PartitionSelector -> System.Threading.Tasks.Task<System.Fabric.Result.MovePrimaryResult>
Public Function MovePrimaryAsync (nodeName As String, partitionSelector As PartitionSelector) As Task(Of MovePrimaryResult)

Parameters

nodeName
String

Node name where primary replica to be moved

partitionSelector
PartitionSelector

Move primary will be called on this Selected Partition.

Returns

A task with move primary result

Exceptions

Retry is exhausted.

Invalid operation - If action called on stateless service. - If not enough nodes available for action

FabricErrorCode.NotReady - If Primary replica is not ready for movement FabricErrorCode.AlreadyPrimaryReplica - If Primary replica for selected partition already exist on new node FabricErrorCode.ConstraintNotSatisfied - If the constraints for the new location of the replica would prohibit the move FabricErrorCode.AsyncOperationNotComplete - Services are temporarily in a torn aligned affinity state

Remarks

API uses the primary replica of the selected partition to move to new node location specified by nodeName. 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. Starting with Service Fabric 7.1, **Move-ServiceFabricPrimaryReplica** takes aligned affinity into consideration. If the primary to be moved is a part of an aligned affinity relationship, then all replicas in that relationship will be moved together. If the primary replicas of such services are are not completely able to move within specified timeout, an exception will be thrown (FabricErrorCode.AsyncOperationNotComplete) indicating the services are temporarily in a torn aligned affinity state. To remediate, issue the operation again.

Applies to

MovePrimaryAsync(PartitionSelector, CancellationToken)

Moves selected primary replica to new node in the cluster.

public System.Threading.Tasks.Task<System.Fabric.Result.MovePrimaryResult> MovePrimaryAsync (System.Fabric.PartitionSelector partitionSelector, System.Threading.CancellationToken token);
member this.MovePrimaryAsync : System.Fabric.PartitionSelector * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Fabric.Result.MovePrimaryResult>
Public Function MovePrimaryAsync (partitionSelector As PartitionSelector, token As CancellationToken) As Task(Of MovePrimaryResult)

Parameters

partitionSelector
PartitionSelector

Move primary will be called on this Selected Partition.

token
CancellationToken

The cancellation token

Returns

A task with move primary result

Exceptions

Retry is exhausted.

Invalid operation - If action called on stateless service. - If not enough nodes available for action

FabricErrorCode.NotReady - If Primary replica is not ready for movement FabricErrorCode.AlreadyPrimaryReplica - If Primary replica for selected partition already exist on new node FabricErrorCode.ConstraintNotSatisfied - If the constraints for the new location of the replica would prohibit the move FabricErrorCode.AsyncOperationNotComplete - Services are temporarily in a torn aligned affinity state

Remarks

API uses the primary replica of the selected partition to move to new node location. This overload uses random node selected from current node list, where primary replica does not exist at the time of API call for moving primary replica. 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. Starting with Service Fabric 7.1, **Move-ServiceFabricPrimaryReplica** takes aligned affinity into consideration. If the primary to be moved is a part of an aligned affinity relationship, then all replicas in that relationship will be moved together. If the primary replicas of such services are are not completely able to move within specified timeout, an exception will be thrown (FabricErrorCode.AsyncOperationNotComplete) indicating the services are temporarily in a torn aligned affinity state. To remediate, issue the operation again.

Applies to

MovePrimaryAsync(PartitionSelector, Boolean)

Moves selected primary replica to new node in the cluster.

public System.Threading.Tasks.Task<System.Fabric.Result.MovePrimaryResult> MovePrimaryAsync (System.Fabric.PartitionSelector partitionSelector, bool ignoreConstraints);
member this.MovePrimaryAsync : System.Fabric.PartitionSelector * bool -> System.Threading.Tasks.Task<System.Fabric.Result.MovePrimaryResult>
Public Function MovePrimaryAsync (partitionSelector As PartitionSelector, ignoreConstraints As Boolean) As Task(Of MovePrimaryResult)

Parameters

partitionSelector
PartitionSelector

Move primary will be called on this Selected Partition.

ignoreConstraints
Boolean

Whether or not to ignore constraints when attempting to execute the move.

Returns

A task with move primary result

Exceptions

Retry is exhausted.

Invalid operation - If action called on stateless service. - If not enough nodes available for action

FabricErrorCode.NotReady - If Primary replica is not ready for movement FabricErrorCode.AlreadyPrimaryReplica - If Primary replica for selected partition already exist on new node FabricErrorCode.ConstraintNotSatisfied - If the constraints for the new location of the replica would prohibit the move FabricErrorCode.AsyncOperationNotComplete - Services are temporarily in a torn aligned affinity state

Remarks

API uses the primary replica of the selected partition to move to new node location. This overload uses random node selected from current node list, where primary replica does not exist at the time of API call for moving primary replica. 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. Starting with Service Fabric 7.1, **Move-ServiceFabricPrimaryReplica** takes aligned affinity into consideration. If the primary to be moved is a part of an aligned affinity relationship, then all replicas in that relationship will be moved together. If the primary replicas of such services are are not completely able to move within specified timeout, an exception will be thrown (FabricErrorCode.AsyncOperationNotComplete) indicating the services are temporarily in a torn aligned affinity state. To remediate, issue the operation again.

Applies to

MovePrimaryAsync(PartitionSelector)

Moves selected primary replica to new node in the cluster.

public System.Threading.Tasks.Task<System.Fabric.Result.MovePrimaryResult> MovePrimaryAsync (System.Fabric.PartitionSelector partitionSelector);
member this.MovePrimaryAsync : System.Fabric.PartitionSelector -> System.Threading.Tasks.Task<System.Fabric.Result.MovePrimaryResult>
Public Function MovePrimaryAsync (partitionSelector As PartitionSelector) As Task(Of MovePrimaryResult)

Parameters

partitionSelector
PartitionSelector

Move primary will be called on this Selected Partition.

Returns

A task with move primary result

Exceptions

Retry is exhausted.

Invalid operation - If action called on stateless service. - If not enough nodes available for action

FabricErrorCode.NotReady - If Primary replica is not ready for movement FabricErrorCode.AlreadyPrimaryReplica - If Primary replica for selected partition already exist on new node FabricErrorCode.ConstraintNotSatisfied - If the constraints for the new location of the replica would prohibit the move FabricErrorCode.AsyncOperationNotComplete - Services are temporarily in a torn aligned affinity state

Remarks

API uses the primary replica of the selected partition to move to new node location. This overload uses random node selected from current node list, where primary replica does not exist at the time of API call for moving primary replica. 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. Starting with Service Fabric 7.1, **Move-ServiceFabricPrimaryReplica** takes aligned affinity into consideration. If the primary to be moved is a part of an aligned affinity relationship, then all replicas in that relationship will be moved together. If the primary replicas of such services are are not completely able to move within specified timeout, an exception will be thrown (FabricErrorCode.AsyncOperationNotComplete) indicating the services are temporarily in a torn aligned affinity state. To remediate, issue the operation again.

Applies to

MovePrimaryAsync(PartitionSelector, Boolean, CancellationToken)

Moves selected primary replica to new node in the cluster.

public System.Threading.Tasks.Task<System.Fabric.Result.MovePrimaryResult> MovePrimaryAsync (System.Fabric.PartitionSelector partitionSelector, bool ignoreConstraints, System.Threading.CancellationToken token);
member this.MovePrimaryAsync : System.Fabric.PartitionSelector * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Fabric.Result.MovePrimaryResult>
Public Function MovePrimaryAsync (partitionSelector As PartitionSelector, ignoreConstraints As Boolean, token As CancellationToken) As Task(Of MovePrimaryResult)

Parameters

partitionSelector
PartitionSelector

Move primary will be called on this Selected Partition.

ignoreConstraints
Boolean

Whether or not to ignore constraints when attempting to execute the move.

token
CancellationToken

The cancellation token

Returns

A task with move primary result

Exceptions

Retry is exhausted.

Invalid operation - If action called on stateless service. - If not enough nodes available for action

FabricErrorCode.NotReady - If Primary replica is not ready for movement FabricErrorCode.AlreadyPrimaryReplica - If Primary replica for selected partition already exist on new node FabricErrorCode.ConstraintNotSatisfied - If the constraints for the new location of the replica would prohibit the move FabricErrorCode.AsyncOperationNotComplete - Services are temporarily in a torn aligned affinity state

Remarks

API uses the primary replica of the selected partition to move to new node location. This overload uses random node selected from current node list, where primary replica does not exist at the time of API call for moving primary replica. 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. Starting with Service Fabric 7.1, **Move-ServiceFabricPrimaryReplica** takes aligned affinity into consideration. If the primary to be moved is a part of an aligned affinity relationship, then all replicas in that relationship will be moved together. If the primary replicas of such services are are not completely able to move within specified timeout, an exception will be thrown (FabricErrorCode.AsyncOperationNotComplete) indicating the services are temporarily in a torn aligned affinity state. To remediate, issue the operation again.

Applies to