Skip to main content

ApplyEvent

Enum ApplyEvent 

Source
pub enum ApplyEvent {
Show 26 variants RunStarted { run_id: String, writes: usize, deletes: usize, }, Staged { files: usize, }, LockAcquired { hold_s: u64, }, Committed { moved: usize, deleted: usize, }, LockVerdict { held: bool, }, ScanDone, VerifyDone { ok: bool, }, Finalized, CommitInterrupted { code: String, }, VerifyChecks { checks: Vec<(String, String)>, }, RestoreStarted { cause: Option<RollbackCause>, }, LiveChangesDiscarded { count: usize, paths: Vec<String>, }, Restored, Cleared, InterruptedRun { phase: &'static str, action: &'static str, hashes: BTreeMap<String, Option<String>>, }, PreflightChecks { checks: Vec<(String, String)>, }, DesignersPoll { open: usize, }, DesignersProceed { sessions: Vec<DesignerSeen>, }, GwbkDownloaded { bytes: u64, }, GwbkSkipped, BackupSampled { last_sync: Option<i64>, }, BackupWaitStarted { budget_s: u64, }, BackupPoll { peer_connected: bool, sync_pending: bool, advanced: bool, }, BackupResync { ok: bool, code: Option<String>, }, BackupVerdict { converged: bool, reason: Option<&'static str>, }, Failed { code: String, },
}
Expand description

One step of a run, value-free: ids, counts and flags only.

Variants§

§

RunStarted

The run directory exists.

Fields

§run_id: String

The run.

§writes: usize

Files to write.

§deletes: usize

Files to delete.

§

Staged

prepare staged the batch.

Fields

§files: usize

Files staged.

§

LockAcquired

The scan-lock was taken.

Fields

§hold_s: u64

Seconds requested.

§

Committed

commit returned.

Fields

§moved: usize

Writes moved.

§deleted: usize

Deletes done.

§

LockVerdict

The lock was judged after the commit.

Fields

§held: bool

Whether it was held with the margin left.

§

ScanDone

The config scan completed.

§

VerifyDone

deploy_verify answered.

Fields

§ok: bool

Whether it was green.

§

Finalized

The run was finalized.

§

CommitInterrupted

commit returned an error and this run’s journal is still on the box: what is on the host is unknown and the run is recovered with rollback --run (23-12). Carries the code of the original failure.

Fields

§code: String

The error code commit failed with.

§

VerifyChecks

The checks of a red verdict, by id and status.

Fields

§checks: Vec<(String, String)>

(check id, status) in report order.

§

RestoreStarted

A restore began (23-17). None is a manual rollback (23-11): the closed data.cause vocabulary of an apply is unchanged.

Fields

§cause: Option<RollbackCause>

Why an apply is being undone; None for a manual rollback.

§

LiveChangesDiscarded

A rollback went ahead over live changes made after the run (--discard-live-changes, 23-11): the first paths and the count.

Fields

§count: usize

How many touched paths had changed.

§paths: Vec<String>

The first crate::error::APPLY_LIST_SHOWN, byte-sorted.

§

Restored

The restore finished (23-17).

§

Cleared

A recovery removed an interrupted run that had changed nothing (23-12, D-10).

§

InterruptedRun

A rollback found that the run it recovers was interrupted (23-12, D-09, D-11): the journal’s phase, what recovery will do and the live hash of each path of the journal’s touched list (None when absent).

Fields

§phase: &'static str

The journal’s phase.

§action: &'static str

restore or clear.

§hashes: BTreeMap<String, Option<String>>

Path to live hash.

§

PreflightChecks

The preflights found a failed check; every verdict, by id and status.

Fields

§checks: Vec<(String, String)>

(check id, status) in report order.

§

DesignersPoll

The Designer list was read under --designers wait.

Fields

§open: usize

Sessions open at this read.

§

DesignersProceed

--designers proceed went ahead over these open sessions (D-15).

Fields

§sessions: Vec<DesignerSeen>

(user, project, host) of each open session.

§

GwbkDownloaded

The .gwbk was downloaded and read as a ZIP (23-09).

Fields

§bytes: u64

Its size in bytes.

§

GwbkSkipped

--skip-gwbk: no .gwbk was taken (23-09).

§

BackupSampled

The backup’s sync timestamp was sampled (V3, D-05). Twice per run: after the preflights (the fail-fast read) and again once the lock is held, just before the commit (WR-02); the second is the baseline.

Fields

§last_sync: Option<i64>

The backup’s lastSyncTimestamp; None is never synced.

§

BackupWaitStarted

The wait for the backup began, after the snapshot download (V3).

Fields

§budget_s: u64

The budget in seconds.

§

BackupPoll

One look at the backup’s status (V3).

Fields

§peer_connected: bool

The backup sees its peer.

§sync_pending: bool

A sync is queued on the backup.

§advanced: bool

The backup’s timestamp advanced past its sample.

§

BackupResync

The one resync request was sent to the master (V3, D-07).

Fields

§ok: bool

The POST was accepted.

§code: Option<String>

The error code when it was not.

§

BackupVerdict

The backup phase ended (V3).

Fields

§converged: bool

The backup converged.

§reason: Option<&'static str>

Why not, when it did not.

§

Failed

The run failed.

Fields

§code: String

The error code slug.

Implementations§

Source§

impl ApplyEvent

Source

pub fn name(&self) -> &'static str

The event’s name in events.ndjson.

Source

pub fn fields(&self) -> Value

The event’s fields: ids, counts and flags, never a value.

Trait Implementations§

Source§

impl Clone for ApplyEvent

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ApplyEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ApplyEvent

Source§

impl PartialEq for ApplyEvent

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ApplyEvent

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more