pub enum CheckpointCommitted {
JobPinned {
job: Locator,
},
Committed(Commit),
}Expand description
checkpoint_committed carries two facts that are not the same fact,
and this enum states which one a line holds instead of leaving a
reader to infer it from which keys are absent.
A dispatch opens a run by pinning the job it came out of; a checkpoint raises a git commit before a wave. Both were written under this one kind before these structs existed, and re-spelling a ledger already on disk is not available, so the two shapes stay under one kind and are told apart by their keys. The variants are untagged: each one writes exactly the object its hand-written predecessor wrote, with no discriminator added.
The pin should be its own kind. It answers “which job is this
run for”, which no commit answers, and every reader of this kind
starts by discarding it. Splitting it needs a new EventKind and a
ledger version, so it is recorded here rather than done here.
Variants§
JobPinned
The dispatch pin: the job a run was opened for, and no commit.
Committed(Commit)
A checkpoint or a landing: the commit, and the facts the record cannot state for itself.