pub struct CheckpointReport {
pub busy: bool,
pub log_frames: u64,
pub checkpointed_frames: u64,
}Expand description
What PRAGMA wal_checkpoint returned (0.12.13, W5.2, D-156).
The three columns SQLite gives back, named, rather than () — a checkpoint
that did nothing and a checkpoint that reclaimed a 400 MB WAL are the same
Ok(()), and the difference is the entire reason a caller asked.
Fields§
§busy: booltrue when SQLite could not complete the requested mode because a
reader or writer was in the way.
This is not an error, and it is not ignorable. TRUNCATE waits for
readers only as long as busy_timeout allows; past that it gives up and
says so, having possibly still copied frames. A caller checkpointing
before copying the file away must read this, because a busy checkpoint
means the main file is not self-contained yet.
log_frames: u64Frames left in the WAL at the end. 0 when the checkpoint completed,
since the mode run is TRUNCATE.
checkpointed_frames: u64Frames moved back into the database file.
Read from a FULL pass rather than from the TRUNCATE — see
run_checkpoint for why a truncating checkpoint cannot report this
number itself.
Implementations§
Source§impl CheckpointReport
impl CheckpointReport
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
The WAL was fully reclaimed: nothing blocked, and nothing is left.
Trait Implementations§
Source§impl Clone for CheckpointReport
impl Clone for CheckpointReport
Source§fn clone(&self) -> CheckpointReport
fn clone(&self) -> CheckpointReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CheckpointReport
Source§impl Debug for CheckpointReport
impl Debug for CheckpointReport
impl Eq for CheckpointReport
Source§impl PartialEq for CheckpointReport
impl PartialEq for CheckpointReport
impl StructuralPartialEq for CheckpointReport
Auto Trait Implementations§
impl Freeze for CheckpointReport
impl RefUnwindSafe for CheckpointReport
impl Send for CheckpointReport
impl Sync for CheckpointReport
impl Unpin for CheckpointReport
impl UnsafeUnpin for CheckpointReport
impl UnwindSafe for CheckpointReport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request