Skip to main content

Module journal

Module journal 

Source
Expand description

The write-ahead journal, journal.jsonl in the run’s backup folder: one JSON record per line, appended and synced before the next write it describes. A step’s intent (with its before-image) is recorded before the step runs and its result after, so a run that stops anywhere resumes at the first step without a result, and a rollback knows what to undo.

No record holds a key or a secret: a before-image names a key row, and the row itself comes back from the backup copy of its database.

Structs§

BackupEntry
One file the run copied before its first write.
Fingerprint
What a file looked like when the run finished, for restore mode.
Journal
An open journal: its records so far, appended to on disk as they come.

Enums§

Record
Step
The steps of §4 Phase 2, in the order they run for each agent.

Constants§

JOURNAL_FILE
STEPS

Functions§

journals
Every run’s journal under backups, newest first.