共用方式為


FabricClient.ClusterManagementClient.RemoveNodeStateAsync Method

Definition

Overloads

RemoveNodeStateAsync(String)

Indicates that the persisted data of a node is lost (e.g., due to disk failure, or reimage, etc.), and that Service Fabric should treat any services or state on that node as lost and unrecoverable.

RemoveNodeStateAsync(String, TimeSpan, CancellationToken)

Indicates that a particular node (which is down) has actually been lost, and that Service Fabric should treat any services or state on that node as lost and unrecoverable.

RemoveNodeStateAsync(String)

Indicates that the persisted data of a node is lost (e.g., due to disk failure, or reimage, etc.), and that Service Fabric should treat any services or state on that node as lost and unrecoverable.

public System.Threading.Tasks.Task RemoveNodeStateAsync (string nodeName);
member this.RemoveNodeStateAsync : string -> System.Threading.Tasks.Task
Public Function RemoveNodeStateAsync (nodeName As String) As Task

Parameters

nodeName
String

The name of the node which has been permanently lost.

Returns

A task representing the operation.

Exceptions

Remarks

After a node goes down, Service Fabric will keep track of replicas of persisted services on that node as they have state on that node.

In cases where the administrator knows that the persisted state on a node has been permanently lost the RemoveNodeStateAsync(String) method should be called ... to notify Service Fabric that the state on the node is gone (or the node can never come back with the state it had).

This instructs Service Fabric to stop waiting for that node (and any persisted replicas on that node) to recover.

NOTE: This API must be called only after it has been determined that the state on that node has been lost.

Starting from Service Fabric 6.5, in order to use this API for seed nodes, please change the seed nodes to regular (non-seed) nodes and then invoke this API to remove the node state.

If the cluster is running on Azure, after the seed node goes down, Service Fabric will try to change it to a non-seed node automatically. To make this happen, make sure the number of non-seed nodes in the primary node type is no less than the number of Down seed nodes. If necessary, add more nodes to the primary node type to achieve this.

For standalone cluster, if the Down seed node is not expected to come back up with its state intact, please remove the node from the cluster, See https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-windows-server-add-remove-nodes/

If this API is called and then the node comes back with its state intact it is Undefined Behavior

Applies to

RemoveNodeStateAsync(String, TimeSpan, CancellationToken)

Indicates that a particular node (which is down) has actually been lost, and that Service Fabric should treat any services or state on that node as lost and unrecoverable.

public System.Threading.Tasks.Task RemoveNodeStateAsync (string nodeName, TimeSpan timeout, System.Threading.CancellationToken cancellationToken);
member this.RemoveNodeStateAsync : string * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function RemoveNodeStateAsync (nodeName As String, timeout As TimeSpan, cancellationToken As CancellationToken) As Task

Parameters

nodeName
String

The name of the node which has been permanently lost.

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 operation.

Exceptions

Remarks

After a node goes down, Service Fabric will keep track of replicas of persisted services on that node as they have state on that node.

In cases where the administrator knows that a node (and its state) has been permanently lost the RemoveNodeStateAsync(String) method should be called.

This instructs Service Fabric to stop waiting for that node (and any persisted replicas on that node) to recover.

NOTE: This API must be called only after it has been determined that the state on that node has been lost.

Starting from Service Fabric 6.5, in order to use this API for seed nodes, please change the seed nodes to regular (non-seed) nodes and then invoke this API to remove the node state.

If the cluster is running on Azure, after the seed node goes down, Service Fabric will try to change it to a non-seed node automatically. To make this happen, make sure the number of non-seed nodes in the primary node type is no less than the number of Down seed nodes. If necessary, add more nodes to the primary node type to achieve this.

For standalone cluster, if the Down seed node is not expected to come back up with its state intact, please remove the node from the cluster, See https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-windows-server-add-remove-nodes/

If this API is called and then the node comes back with its state intact it is Undefined Behavior

Applies to