Table of Contents

Class EmbeddingGenerationUpkeep

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

One bounded pass of everything this instance's vector generations need doing to them.

public sealed class EmbeddingGenerationUpkeep
Inheritance
EmbeddingGenerationUpkeep
Inherited Members

Remarks

Three steps in one pass, in the order they depend on each other: fill whichever generation is behind, complete a generation that has stopped being behind, and remove the vectors of one that nothing reads any more. They ride one loop rather than three workers because they are one pipeline — the third step exists only because the second one happened — and because each is bounded, so a pass that finds all three outstanding still ends.

The completion is what makes a model change an operation without an outage. A new generation is filled while the old one goes on answering searches, and the moment it is complete it takes over in one recorded transition; the old generation's vectors then go, in batches, because they are personal data whose purpose ended there. See ADR 0006.

Constructors

EmbeddingGenerationUpkeep(IEmbeddingGenerationStore, IStoredEmailEmbeddingBackfillStore, StoredEmailEmbeddingBackfill, IEmbeddingProfileVectorIndex, OptimisticConcurrencyRetryPolicy)

Initializes a new upkeep pass.

Methods

RunAsync(CancellationToken)

Runs one bounded pass.