다음을 통해 공유


IDurableEntityClient.CleanEntityStorageAsync Method

Definition

Removes empty entities from storage and releases orphaned locks.

public System.Threading.Tasks.Task<Microsoft.Azure.WebJobs.Extensions.DurableTask.CleanEntityStorageResult> CleanEntityStorageAsync (bool removeEmptyEntities, bool releaseOrphanedLocks, System.Threading.CancellationToken cancellationToken);
abstract member CleanEntityStorageAsync : bool * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.WebJobs.Extensions.DurableTask.CleanEntityStorageResult>
Public Function CleanEntityStorageAsync (removeEmptyEntities As Boolean, releaseOrphanedLocks As Boolean, cancellationToken As CancellationToken) As Task(Of CleanEntityStorageResult)

Parameters

removeEmptyEntities
Boolean

Whether to remove empty entities.

releaseOrphanedLocks
Boolean

Whether to release orphaned locks.

cancellationToken
CancellationToken

Cancellation token that can be used to cancel the operation.

Returns

A task that completes when the operation is finished.

Remarks

An entity is considered empty, and is removed, if it has no state, is not locked, and has been idle for more than EntityMessageReorderWindowInMinutes minutes. Locks are considered orphaned, and are released, if the orchestration that holds them is not in state Running. This should not happen under normal circumstances, but can occur if the orchestration instance holding the lock exhibits replay nondeterminism failures, or if it is explicitly purged.

Applies to