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
38
39
40
41
42
43
44
45
46
47
//! Vertex table crash-recovery contract.
//!
//! Durability spans two layers with exactly one commit point:
//!
//! 1. Commit: the engine transaction WAL (`InsertVertexRedo` and peers)
//! is the durable source of truth for committed but unflushed rows.
//! Crash recovery replays it before tables serve reads, so a crash
//! between commit and flush loses nothing as long as replay runs.
//! 2. Checkpoint: full or incremental flush writes shard files first and
//! `commit_manifest.json` last. The manifest lists every file the open
//! path may trust; files outside it are never read.
//! 3. Open: a manifest-listed table-critical file that is missing or corrupt
//! refuses the whole table open instead of running sick. Per-column files
//! (overflow sidecars and incremental column pages) degrade to
//! column-unavailable instead. There is deliberately no degraded
//! single-shard open: serving a subset of shards would hand out global
//! IDs whose siblings silently vanished, which readers cannot distinguish
//! from genuine absence.
//!
//! Fault-injection coverage for this contract lives in
//! `crates/linkrs-storage/tests/persistence_recovery.rs`: flush plus
//! reload, plus corrupt-manifest refusal (a manifest-listed file that is
//! missing or corrupt must fail the open).
//!
//! Split by responsibility; each submodule owns one persistence domain and
//! contributes either manifest types or an `impl ShardedVertexTable` block:
//! - `common`: manifest version plus wall-clock helper.
//! - `table_manifest`: shard layout pin that global IDs decode with.
//! - `commit_manifest`: one checkpoint pin written atomically last.
//! - `sidecar`: derived snapshot caches, verifiable but discardable.
//! - `health`: offline read-only inspection for half-damaged stores.
//! - `flush`: full plus incremental checkpoint writes.
//! - `load`: strict recovery reads plus delta apply.
pub
pub use CommitKind;
pub use now_ms;