Share via


FabricClient.ServiceManagementClient.ReportCompletionAsync Method

Definition

Marks a service replica as completed of a service running on a node. Also takes in timeout interval, which is the maximum of time the system will allow this operation to continue before returning TimeoutException and cancellation-token that the operation is observing.

public System.Threading.Tasks.Task ReportCompletionAsync (string nodeName, Guid partitionId, long replicaOrInstanceId, TimeSpan timeout, System.Threading.CancellationToken cancellationToken);
member this.ReportCompletionAsync : string * Guid * int64 * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function ReportCompletionAsync (nodeName As String, partitionId As Guid, replicaOrInstanceId As Long, timeout As TimeSpan, cancellationToken As CancellationToken) As Task

Parameters

nodeName
String

The name of the node.

partitionId
Guid

The partition identifier.

replicaOrInstanceId
Int64

The instance identifier.

timeout
TimeSpan

The timespan that defines the maximum amount of time will allow this operation to continue before returning a TimeoutException.

cancellationToken
CancellationToken

The optional cancellation token that the operation is observing. It can be used to send a notification that the operation should be canceled. Note that cancellation is advisory and that the operation may still be completed even if it is cancelled.

Returns

A Task representing the acknowledgment of the request.

Exceptions

ReplicaDoesNotExist is returned if the replica or instance id is not running on the node.

InvalidReplicaStateForReplicaOperation is returned if the replica or instance id cannot be completed at this time as it is in an invalid state.

InvalidReplicaOperation is returned if the replica does not belong to a stateless service.

See also https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-errors-and-exceptions for handling common FabricClient failures.

If nodeName is null or empty.

Remarks

WARNING: There are no safety checks performed when this API is used.

Applies to