// ─── disk/mod.rs ─────────────────────────────────────────────────────────────
// This module implements two concrete StorageBackend implementations that write
// the database log to a real file on disk:
//
// • AsyncDiskStorage — high-throughput, non-blocking writes via an MPSC
// channel + background Tokio task. Writes are buffered
// in memory and flushed to disk every 50 ms. Ideal for
// analytics / high-write workloads where losing the last
// 50 ms of data on a crash is acceptable.
//
// • SyncDiskStorage — every write blocks until the OS confirms the data is
// on disk (flush after every entry). Zero data loss on
// crash, but much lower throughput. Enabled by setting
// the WRITE_MODE=sync environment variable.
//
// Both implementations share the same binary snapshot + streaming log replay
// logic for fast startup (see snapshot.rs and log.rs).
// ─────────────────────────────────────────────────────────────────────────────
pub
pub
pub
pub
// Re-export the two public storage structs so the rest of the crate can use
// them via `storage::disk::AsyncDiskStorage` / `storage::disk::SyncDiskStorage`.
pub use AsyncDiskStorage;
pub use SyncDiskStorage;
// Re-export stream_log_entries and read_log_from_disk — used by encrypted.rs
// and other storage wrappers that need to read the raw log.
pub use ;
// Re-export helpers used by tiered.rs for its own compaction + snapshot logic.
pub use ;
pub use write_snapshot;