pub(super) struct JournalCheckpoint {
pub(super) journal_id: u64,
pub(super) next_usn: i64,
}Expand description
USN position paired with the index state, shared with Engine::flush.
The tailing thread owns the journal handle; “save now” from another
thread needs (journal_id, next_usn) without touching it. Updated after
a batch is applied, so a concurrent flush that reads the checkpoint
first always saves checkpoint ≤ index — the USN replay on load covers
the gap (re-applying records is idempotent; skipping them would not be).
Fields§
§journal_id: u64§next_usn: i64Trait Implementations§
Source§impl Clone for JournalCheckpoint
impl Clone for JournalCheckpoint
Source§fn clone(&self) -> JournalCheckpoint
fn clone(&self) -> JournalCheckpoint
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for JournalCheckpoint
Auto Trait Implementations§
impl Freeze for JournalCheckpoint
impl RefUnwindSafe for JournalCheckpoint
impl Send for JournalCheckpoint
impl Sync for JournalCheckpoint
impl Unpin for JournalCheckpoint
impl UnsafeUnpin for JournalCheckpoint
impl UnwindSafe for JournalCheckpoint
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more