Table of Contents

Method RunAsync

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

RunAsync(RegisteredEmbeddingProfile, CancellationToken)

Runs one bounded pass of the backfill towards one generation.

public Task<StoredEmailEmbeddingBackfillResult> RunAsync(RegisteredEmbeddingProfile target, CancellationToken cancellationToken)

Parameters

target RegisteredEmbeddingProfile

The generation whose missing vectors this run produces.

cancellationToken CancellationToken

Cancels the run between messages, between batches, and inside a message's turn.

Returns

Task<StoredEmailEmbeddingBackfillResult>

What this run produced, and why it ended.

Remarks

The target is taken once for the whole walk rather than per message, because it is what the outstanding-work query is expressed against: a run that changed generation half way through would leave two prefixes of two generations and a position that describes neither.

Exceptions

ArgumentNullException

Thrown when target is null.

PersistenceConcurrencyConflictException

Thrown when a competing writer wins a race that the bounded retries could not resolve. Passages and vectors already committed stay durable, and the next run resumes from the committed position.

OperationCanceledException

Thrown when the caller cancels. Committed passages, vectors, and positions stay durable.