Table of Contents

Method RepointAtObjectAsync

Namespace
MailFathom.Application.EmailContent.Move
Assembly
MailFathom.Application.dll

RepointAtObjectAsync(EmailContentKind, Guid, string, DateTimeOffset, CancellationToken)

Points one row at the verified object, leaving the payload the database was holding exactly where it is.

Task<bool> RepointAtObjectAsync(EmailContentKind kind, Guid payloadId, string objectLocator, DateTimeOffset verifiedAt, CancellationToken cancellationToken)

Parameters

kind EmailContentKind

The payload kind, which decides the table.

payloadId Guid

The identity of the row to repoint.

objectLocator string

The whole key the verified object was written under.

verifiedAt DateTimeOffset

When the object was read back and found to be the payload the row describes.

cancellationToken CancellationToken

Propagates caller cancellation.

Returns

Task<bool>

true when the row was still database-backed and now points at the object.

Remarks

One statement, conditional on the row still being database-backed, which is what makes it safe to issue outside any transaction the move opened: a re-synchronization that rewrote the payload while the object was being written wins, and this answers false rather than pointing a newer row at an older message.

The payload column is deliberately left as it is. The row is now read from its object and the bytes beside it are a retained duplicate, held so that a read still works while a deployment is trusting its bucket for the first time — ADR 0017 § 6. Freeing it is an operator's own act through IRetainedContentReleaseStore, because it is the one irreversible step in the whole move and must not be a consequence of a background pass.

The verification instant is what the safety interval is later measured from, so it is written here rather than derived from anything: it says how long this deployment has been reading that object, which is a different question from how old the mail is. The recorded length and digest stay exactly as they were, so the object remains checkable against the row that names it after the retained copy has gone.