Table of Contents

Class RetainedContentRelease

Namespace
MailFathom.Application.EmailContent.Release
Assembly
MailFathom.Application.dll

Frees the database copies the move left beside the objects it verified, one bounded batch per request.

public sealed class RetainedContentRelease
Inheritance
RetainedContentRelease
Inherited Members

Remarks

The move copies and never removes. A payload it has carried is read from its object and still holds the bytes the database always held, which is what lets a read fall back while a deployment is trusting its bucket for the first time. This is the step that ends that, and it is the only irreversible thing the whole move does: what it removes is the last copy of a message outside the endpoint.

So it is an operator's request each time rather than a consequence of anything. No interval elapsing performs it, no worker carries it, and a move reaching the end of the content does not begin it — because a background job that disposed of mail on a timer is precisely what an operator must not have to trust.

It refuses outright while the database still owns a payload. A payload the move has not carried is one no object was ever verified for, and a deployment holding one is a deployment whose move is unfinished; freeing the copies of everything else would end the safety of a job somebody is still in the middle of. The refusal names the backlog, and another move is what repairs it.

Nothing here reads a payload or reaches the endpoint. The object was read back and checked against the row's own length and digest before the row was ever pointed at it, that check is what the row records, and those two values stay on the row afterwards so the object is still checkable once the bytes are gone.

Constructors

RetainedContentRelease(IRetainedContentReleaseStore, IStoredContentMoveStore, IRetainedContentReleaseTelemetry, RetainedContentReleaseOptions, TimeProvider, AccessAuthorization)

Initializes the release.

Methods

ReadAsync(CancellationToken)

Reads what is retained and what is still uncarried, without freeing anything.

ReleaseAsync(CancellationToken)

Frees one bounded batch of the retained copies, if the deployment has finished carrying its content.