Skip to main content

Module checkpoint

Module checkpoint 

Source
Expand description

Checkpoint state types and I/O for the compaction engine.

The checkpoint is the materialized state produced by reducing all events. It lives at checkpoint/state.json in the hub cache and tracks display ID allocation, lock state, issue state, and compaction metadata.

Structs§

CheckpointState
Materialized state produced by compaction.
CompactIssue
Compact issue representation for reduction (tracks mutable fields only).
CompactionLease
Advisory compaction lease to prevent concurrent compaction.
LockEntry
A lock entry in the checkpoint state.
SkewWarning
Warning about clock skew detected during compaction.
UnsignedEventWarning
Warning about an unsigned event encountered during compaction.

Functions§

read_checkpoint
Read checkpoint state from disk. Returns default if missing.
read_watermark
Read the compaction watermark (last processed ordering key).
write_checkpoint
Write checkpoint state to disk (pretty-printed JSON).
write_watermark
Write the compaction watermark.