Table of Contents

Method CancelAsync

Namespace
MailFathom.Application.Emails.Embeddings.Generations
Assembly
MailFathom.Application.dll

CancelAsync(CancellationToken)

Abandons the generation being built, if one is.

public Task<EmbeddingReindexCancellationOutcome> CancelAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Cancels the read and the transition.

Returns

Task<EmbeddingReindexCancellationOutcome>

Whether a reindex was abandoned.

Remarks

Stopping a run is asking the deployment to do something it can already do, which is the operating grant rather than the one that started the spend.

Exceptions

EmbeddingVectorIndexFailedException

Thrown when the abandonment committed but the database refused to remove the generation's approximate index. The reindex is stopped either way; the index goes on occupying storage for a generation nothing reads until the removal of its vectors reaches the end and drops it.

PersistenceConcurrencyConflictException

Thrown when a competing writer wins a race the bounded retries could not resolve.

PrincipalNotAuthorizedException

Thrown when the use case was reached by anything but a caller granted AdminOperate.

OperationCanceledException

Thrown when the caller cancels.