Skip to main content

Module admin_intent_log

Module admin_intent_log 

Source
Expand description

Intent log for long-running admin operations.

Records a JSONL trail of every admin operation from begin → checkpoints → complete/abort. At startup, scan_and_report finds any intents that never reached a terminal phase and emits [OperatorEvent::DanglingAdminIntent] for each one so operators can investigate interrupted operations.

§Durability contract

  • File opened with O_APPEND; POSIX guarantees atomic writes up to PIPE_BUF (4096 bytes on Linux) for regular files. Records are capped at 3 KiB so multi-writer atomicity holds on supported kernels.
  • fsync on begin only. Checkpoint / complete / abort writes are buffered — a crash between begin and complete is exactly the “dangling intent” condition scan_and_report is designed to surface.

Structs§

AdminIntentLog
IntentArgs
Caller-supplied arguments for an intent. Sensitive keys are redacted before writing to the log.
IntentHandle
IntentProgress
Progress snapshot attached to a checkpoint record.
IntentSummary
Summary attached to a completed intent record.
UnfinishedIntent

Enums§

IntentLogError
IntentOp
IntentPhase