Table of Contents

Method RecordUnrestorableAsync

Namespace
MailFathom.Application.Synchronization.Restore
Assembly
MailFathom.Application.dll

RecordUnrestorableAsync(IPersistenceSession, MailAccountId, MailboxRestoreAppend, DateTimeOffset, CancellationToken)

Writes down that the restore can never put one message back, so it stops being counted as outstanding.

Task<bool> RecordUnrestorableAsync(IPersistenceSession session, MailAccountId account, MailboxRestoreAppend record, DateTimeOffset settledAt, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

The transaction the record commits in.

account MailAccountId

The account the message is stored for.

record MailboxRestoreAppend

The record to write, which is settled from the moment it exists.

settledAt DateTimeOffset

When the restore established that the message cannot go back.

cancellationToken CancellationToken

Propagates caller cancellation.

Returns

Task<bool>

true when this caller is the one that wrote it.

Remarks

A message whose stored payload cannot be served has no bytes to append and no later pass can produce any, so leaving it a candidate would count it as outstanding on every pass and hold the account in Restoring for ever, with no record for an operator to settle. Recorded as settled it stops being counted, the phase can end, and the source simply never gets that message back — which is what the pass reports as ContentUnreadable and what an operator reads in the log.

Exceptions

ArgumentNullException

Thrown when record is null.