FabricClient.TestManagementClient.StartPartitionDataLossAsync Method

Definition

Overloads

StartPartitionDataLossAsync(Guid, PartitionSelector, DataLossMode, TimeSpan, CancellationToken)

This API will induce data loss for the specified partition. It will trigger a call to the OnDataLoss API of the partition.

StartPartitionDataLossAsync(Guid, PartitionSelector, DataLossMode, TimeSpan)

This API will induce data loss for the specified partition. It will trigger a call to the OnDataLoss API of the partition.

StartPartitionDataLossAsync(Guid, PartitionSelector, DataLossMode, CancellationToken)

This API will induce data loss for the specified partition. It will trigger a call to the OnDataLoss API of the partition.

StartPartitionDataLossAsync(Guid, PartitionSelector, DataLossMode)

This API will induce data loss for the specified partition. It will trigger a call to the OnDataLoss API of the partition.

StartPartitionDataLossAsync(Guid, PartitionSelector, DataLossMode, TimeSpan, CancellationToken)

This API will induce data loss for the specified partition. It will trigger a call to the OnDataLoss API of the partition.

public System.Threading.Tasks.Task StartPartitionDataLossAsync (Guid operationId, System.Fabric.PartitionSelector partitionSelector, System.Fabric.DataLossMode dataLossMode, TimeSpan operationTimeout, System.Threading.CancellationToken cancellationToken);
member this.StartPartitionDataLossAsync : Guid * System.Fabric.PartitionSelector * System.Fabric.DataLossMode * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task

Parameters

operationId
System.Guid

A GUID that identifies a call of this API; this is passed into the corresponding GetProgress API

partitionSelector
PartitionSelector

The PartitionSelector to specify which partition data loss needs to be induced for.

dataLossMode
DataLossMode

Specifies the DataLossMode i.e. the options for inducing data loss.

operationTimeout
System.TimeSpan

The overall timeout for the operation

cancellationToken
System.Threading.CancellationToken

Cancellation token

Returns

System.Threading.Tasks.Task

A task.

Exceptions

System.TimeoutException

Action took more than its allocated time.

System.ArgumentNullException

Any of the required arguments are null.

System.InvalidOperationException

If the API is called for a partition belonging to a stateless service.

These are the fabric failures FabricErrorCode.PartitionNotFound - if the specified partition selected does not exist.

Remarks

Actual data loss will depend on the specified DataLossMode PartialDataLoss - PartialDataLoss - Only a quorum of replicas are removed and OnDataLoss is triggered for the partition but actual data loss depends on presence of in-flight replication. FullDataLoss - All replicas are removed hence all data is lost and OnDataLoss is triggered.

This API should only be called with a stateful service as the target.

Calling this API with a system service as the target is not advised.

The FaultAnalysisService must be enabled to use this API.

Note: Once this API has been called, it cannot be reversed. Calling CancelTestCommandAsync() will only stop execution and clean up internal system state. It will not restore data if the command has progressed far enough to cause data loss.

Applies to

StartPartitionDataLossAsync(Guid, PartitionSelector, DataLossMode, TimeSpan)

This API will induce data loss for the specified partition. It will trigger a call to the OnDataLoss API of the partition.

public System.Threading.Tasks.Task StartPartitionDataLossAsync (Guid operationId, System.Fabric.PartitionSelector partitionSelector, System.Fabric.DataLossMode dataLossMode, TimeSpan operationTimeout);
member this.StartPartitionDataLossAsync : Guid * System.Fabric.PartitionSelector * System.Fabric.DataLossMode * TimeSpan -> System.Threading.Tasks.Task

Parameters

operationId
System.Guid

A GUID that identifies a call of this API; this is passed into the corresponding GetProgress API

partitionSelector
PartitionSelector

The PartitionSelector to specify which partition data loss needs to be induced for.

dataLossMode
DataLossMode

Specifies the DataLossMode i.e. the options for inducing data loss.

operationTimeout
System.TimeSpan

The overall timeout for the operation

Returns

System.Threading.Tasks.Task

A task.

Exceptions

System.TimeoutException

Action took more than its allocated time.

System.ArgumentNullException

Any of the required arguments are null.

System.InvalidOperationException

If the API is called for a partition belonging to a stateless service.

These are the fabric failures FabricErrorCode.PartitionNotFound - if the specified partition selected does not exist.

Remarks

Actual data loss will depend on the specified DataLossMode PartialDataLoss - PartialDataLoss - Only a quorum of replicas are removed and OnDataLoss is triggered for the partition but actual data loss depends on presence of in-flight replication. FullDataLoss - All replicas are removed hence all data is lost and OnDataLoss is triggered.

This API should only be called with a stateful service as the target.

Calling this API with a system service as the target is not advised.

The FaultAnalysisService must be enabled to use this API.

Note: Once this API has been called, it cannot be reversed. Calling CancelTestCommandAsync() will only stop execution and clean up internal system state. It will not restore data if the command has progressed far enough to cause data loss.

Applies to

StartPartitionDataLossAsync(Guid, PartitionSelector, DataLossMode, CancellationToken)

This API will induce data loss for the specified partition. It will trigger a call to the OnDataLoss API of the partition.

public System.Threading.Tasks.Task StartPartitionDataLossAsync (Guid operationId, System.Fabric.PartitionSelector partitionSelector, System.Fabric.DataLossMode dataLossMode, System.Threading.CancellationToken cancellationToken);
member this.StartPartitionDataLossAsync : Guid * System.Fabric.PartitionSelector * System.Fabric.DataLossMode * System.Threading.CancellationToken -> System.Threading.Tasks.Task

Parameters

operationId
System.Guid

A GUID that identifies a call of this API; this is passed into the corresponding GetProgress API

partitionSelector
PartitionSelector

The PartitionSelector to specify which partition data loss needs to be induced for.

dataLossMode
DataLossMode

Specifies the DataLossMode i.e. the options for inducing data loss.

cancellationToken
System.Threading.CancellationToken

Cancellation token

Returns

System.Threading.Tasks.Task

A task.

Exceptions

System.TimeoutException

Action took more than its allocated time.

System.ArgumentNullException

Any of the required arguments are null.

System.InvalidOperationException

If the API is called for a partition belonging to a stateless service.

These are the fabric failures FabricErrorCode.PartitionNotFound - if the specified partition selected does not exist.

Remarks

Actual data loss will depend on the specified DataLossMode PartialDataLoss - PartialDataLoss - Only a quorum of replicas are removed and OnDataLoss is triggered for the partition but actual data loss depends on presence of inflight replication. FullDataLoss - All replicas are removed hence all data is lost and OnDataLoss is triggered.

This API should only be called with a stateful service as the target.

Calling this API with a system service as the target is not advised.

The FaultAnalysisService must be enabled to use this API.

Note: Once this API has been called, it cannot be reversed. Calling CancelTestCommandAsync() will only stop execution and clean up internal system state. It will not restore data if the command has progressed far enough to cause data loss.

Applies to

StartPartitionDataLossAsync(Guid, PartitionSelector, DataLossMode)

This API will induce data loss for the specified partition. It will trigger a call to the OnDataLoss API of the partition.

public System.Threading.Tasks.Task StartPartitionDataLossAsync (Guid operationId, System.Fabric.PartitionSelector partitionSelector, System.Fabric.DataLossMode dataLossMode);
member this.StartPartitionDataLossAsync : Guid * System.Fabric.PartitionSelector * System.Fabric.DataLossMode -> System.Threading.Tasks.Task

Parameters

operationId
System.Guid

A GUID that identifies a call of this API; this is passed into the corresponding GetProgress API.

partitionSelector
PartitionSelector

The PartitionSelector to specify which partition data loss needs to be induced.

dataLossMode
DataLossMode

Specifies the DataLossMode i.e. the options for inducing data loss.

Returns

System.Threading.Tasks.Task

A task.

Exceptions

System.TimeoutException

Action took more than its allocated time.

System.ArgumentNullException

Any of the required arguments are null.

System.InvalidOperationException

If the API is called for a partition belonging to a stateless service.

These are the fabric failures. FabricErrorCode.PartitionNotFound - If the specified partition selected does not exist.

Remarks

Actual data loss will depend on the specified DataLossMode. PartialDataLoss - Only a quorum of replicas are removed and OnDataLoss is triggered for the partition but actual data loss depends on presence of in-flight replication. FullDataLoss - All replicas are removed hence all data is lost and OnDataLoss is triggered.

This API should only be called with a stateful service as the target.

Calling this API with a system service as the target is not advised.

Note: Once this API has been called, it cannot be reversed. Calling CancelTestCommandAsync() will only stop execution and clean up internal system state. It will not restore data if the command has progressed far enough to cause data loss.

The FaultAnalysisService must be enabled to use this API.

Applies to