1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! Journal — logical WAL + replay.
//!
//! Layered design:
//!
//! - [`wal_op`] — the `WalOp` variant union for durable logical
//! mutations (`Insert`, `Erase`, `RenameObject`, `Batch`).
//! - [`codec`] — binary record codec + file header. Pure
//! in-memory bytes ↔ `WalOp`.
//! - [`writer`] — append-only WAL file with
//! `sync_data`-on-flush durability + 64 KB buffered auto-drain
//! mechanics.
//! - [`group_commit`] — WAL append coordinator. Writers publish
//! encoded records into a shared byte ring; one flusher drains the
//! committed prefix and runs `sync_data` for `wal_sync = true`
//! barriers.
//! - [`reader`] — forward replay scanner with graceful
//! torn-tail handling. Unpacks `Batch` records into per-inner
//! callbacks so consumers don't need a `Batch` arm.
//!
//! Checkpoint (flush WAL → drain dirty → fdatasync → truncate
//! WAL) lives in [`crate::Tree::checkpoint`] and the background
//! [`crate::checkpoint`] module, not in here — it straddles the
//! tree + journal boundary.
// The WAL append coordinator: a lock-free shared ring (`ring`) + a single
// flusher (`group_commit`).
pub
pub
pub use Journal;