pub struct SyncFacts<P> {
pub row: SyncStatusRow,
pub sync: RetrySync,
pub unsent: UnsentWork,
pub uploads: Vec<UploadFacts<P>>,
pub queued: bool,
pub records: Vec<(i64, P)>,
pub pass_retry: Option<SystemTime>,
pub operation_retries: Vec<(OperationId, SystemTime)>,
}Expand description
What the sync state is computed from, in one committed snapshot.
Fields§
§row: SyncStatusRowWhat the sync loop knows: coven_sync_status’s row.
sync: RetrySyncWhether a started connection will plan, and the cooldown holding
every request, as coven_retry_effect holds them.
unsent: UnsentWorkWhat the send queue and the upload queue hold (UnsentWork): a
write waits when it counts one.
uploads: Vec<UploadFacts<P>>The bound uploads the state can show, in queue order: the first one sending, the first queued one (neither sending nor stored) with no record and none waiting out a retry, the first with no record that does, and every one with a record. The state shows the first candidate of the highest rank, so no other upload changes it: later sending ones tie with the first, a later queued one ties with the first of its kind (syncing for its turn, waiting for its retry), and a stored one names none.
queued: boolWhether the upload queue holds a bound upload with bytes to send,
whether uploads lists it or not.
records: Vec<(i64, P)>The pending records the state reads, each with its position in
coven_pending, in the order they arose: every one but those about a
trailing upload, a download, a pin coven keeps or a move of trailing
uploads alone.
pass_retry: Option<SystemTime>When the sync scope’s backoff ends, if a failed pass armed one (§6.7): the next try of a pass or of a slot’s application.
operation_retries: Vec<(OperationId, SystemTime)>When each journal operation’s own backoff ends: the next try of coven’s own operation a failed pass names.