Skip to main content

Module kernel

Module kernel 

Source
Expand description

Driving one transaction through the journal (§12 step 7, step 8, the crash-recovery table, ownership and fencing).

The kernel owns ordering: what is journaled before which backend call, who may advance, and what recovery does from each state. Proposal handling, policy, staging and approval sit above it in exec; the backends, probes and process control sit below it, behind Host.

Structs§

Kernel

Enums§

CheckPhase
Which probe run a check belongs to.
CrashPoint
Fault injection for the fake harness: stop dead (as if SIGKILLed) right after a record is durable.
KernelError
RecoveryAction
One row of the crash-recovery table (§12): what recovery does from the state a transaction was left in. Kernel::recover_steps dispatches on it.
Swap 🔒
SwapStep
The hash-compared override replacement (§9 step 4).
Verdict

Constants§

JOB_DRAIN
Job-drain wait during takeover (§16 operational limits).
LEASE_GRACE
How long a lease may go unrenewed before the watchdog treats the owner as gone, once the transaction’s deadline has passed.

Traits§

Host
Everything the kernel needs from below. One generic parameter (no dyn, §6).

Functions§

fence_admits
Whether a backend call tagged with epoch may proceed, given the store’s fence for its transaction (I15): only the current owner’s epoch passes.
next_epoch
The epoch a takeover writes: above both the journaled lease’s and the store’s fence (which may be ahead if an earlier takeover crashed between the two writes). None when epochs are exhausted.
recovery_action
The crash-recovery table (§12).
should_take_over
Whether the watchdog should take a transaction over (§12 recovery watchdog): only in the window where mutation may be under way, never from itself, and only when the owner is dead or has let both the transaction’s deadline and its lease’s grace period pass.
swap_step

Type Aliases§

R 🔒