Skip to main content

Module journal_record

Module journal_record 

Source
Expand description

One journal record written whole, followed by the syncs its durability level names. What: One journal record written whole, followed by exactly the syncs its durability level names. Why: Recovery reads each record of a transaction directory, and the tearing table in doc/planning/cli-git-spawn-and-sync-reduction.md shows which records a power loss may lose or tear without any change of outcome and which must reach the disk before the next step. Naming the level at the call site keeps every record’s sync decision visible, and the budget tests pin the resulting counts.

In TS you’d write (pseudocode):

await writeRecord({ directory, filename, bytes, sync: 'nothing' });

Enums§

RecordSync
What: Which syncs follow a journal record’s write. Why: A record published by link is whole or absent after a kill whatever the level; the level only decides what a power loss may leave.

Functions§

write_record
What: Write filename in directory exclusively and whole, then sync as sync says. Returns the failure as a sentence that names the path. Why: The callers report a failed write as a landing or transaction failure and differ only in the type that wraps the sentence.