TestabilityExtensions.RemoveReplicaAsync Method (FabricClient.ServiceManagementClient, String, Guid, Int64, CompletionMode, Boolean)
This API will remove the replica (equivalent of ReportFault - Permanent) specified by the passed in ReplicaSelector.
Namespace: System.Fabric.Testability
Assembly: System.Fabric.Testability (in System.Fabric.Testability.dll)
Syntax
public static Task<RemoveReplicaResult> RemoveReplicaAsync(
this FabricClient.ServiceManagementClient serviceManagementClient,
string nodeName,
Guid partitionId,
long replicaId,
CompletionMode completionMode,
bool forceRemove
)
Parameters
serviceManagementClient
Type: System.Fabric.FabricClient.ServiceManagementClientThe ServiceManagementClient instance on which the API is called.
nodeName
Type: System.StringNode name where replica is to be moved ReplicaSelector
partitionId
Type: System.GuidPartition Id where the replica needs to be removed
replicaId
Type: System.Int64Replica Id that needs to be removed
completionMode
Type: System.Fabric.Testability.CompletionModeThe CompletionMode that specifies whether to wait until the restart of the replica is complete or not DoNotVerify - Return after triggering the restart of the replica Verify - Return after the remove completes
forceRemove
Type: System.BooleanWill forcefully remove the replica
Return Value
Type: System.Threading.Tasks.Task<RemoveReplicaResult>
RemoveReplicaResult which gives information about the actual selected replica.
Exceptions
| Exception | Condition |
|---|---|
| TimeoutException | Action took more than its allocated time. |
| ArgumentNullException | Any of the required arguments are null. |
| FabricException | These are the fabric failures FabricErrorCode.ReplicaDoesNotExist - If the Selected replica was not found FabricErrorCode.PartitionNotFound - if the specified partition selected does not exist. |
See Also
RemoveReplicaAsync Overload
TestabilityExtensions Class
System.Fabric.Testability Namespace
Return to top