Table of Contents

Enum MailSynchronizationPhase

Namespace
MailFathom.Application.Observability
Assembly
MailFathom.Application.dll

The stages one folder's turn through a synchronization cycle passes through, in the order it reaches them.

public enum MailSynchronizationPhase

Fields

DiscoverEmails = 2

Walking the folder forward: discovering mail, retrieving what it stores, and committing the checkpoint.

FetchEmailBatch = 3

Asking the mail server for one bounded batch of the mail that follows the checkpoint.

Reached once per batch rather than once per run, which is what separates a mail server slow to list a folder from local work slow to derive from it. It is bounded by the run's batch limit, so a run publishes at most that many.

OpenSession = 1

Opening the read-only mail session the rest of the run works over, and reading which incarnation of the folder it is bound to.

ReconcileFolder = 4

Walking the window backwards for the changes a forward pass cannot see, such as mail that was removed.

RefillDeferredContent = 5

Retrieving the content of mail an earlier run recorded without it.

ResolveFolder = 0

Turning the configured alias into the folder the mail server advertises for it.

Remarks

A folder run reports one duration for work whose parts fail and slow down for entirely different reasons: a mail server that stopped answering, a local scan that got slower, a database under contention. These are the boundaries that separate them, and they are the run's own stages rather than a division of its code — a run that ends early reports the stages it reached and no others.

What is deliberately not here is a stage per message. A folder run stores as many emails as its batch bounds allow, so a stage apiece would put one span per synchronized message into a trace store to say what the counters beside it already say better.