pub struct WalSegment {
pub id: WalSegmentId,
pub salt1: u32,
pub salt2: u32,
pub page_size: u32,
pub frame_count: usize,
pub checkpoint_seq: u32,
}Expand description
One salt epoch of a -wal file — a single bounded segment.
A -wal is a bounded segment, not an open-ended log: every live frame here shares
(salt1, salt2). A checkpoint reset (salt change + frame renumber) starts a NEW
WalSegment; it is a discontinuity, never another epoch of the same segment.
Fields§
§id: WalSegmentIdThis segment’s ordinal within the WAL (0 = the segment at file start).
salt1: u32WAL salt-1 (checkpoint generation), shared by every frame in the segment.
salt2: u32WAL salt-2 (checkpoint generation), shared by every frame in the segment.
page_size: u32Page size declared by the segment’s frames (bytes).
frame_count: usizeNumber of frames belonging to this segment.
checkpoint_seq: u32The checkpoint sequence number recorded in the WAL header (offset 12). For a segment discovered after a reset within the same file this is the header’s value; per-segment sequence is otherwise not separately recorded.
Trait Implementations§
Source§impl Clone for WalSegment
impl Clone for WalSegment
Source§fn clone(&self) -> WalSegment
fn clone(&self) -> WalSegment
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more