Skip to main content

Module compaction

Module compaction 

Source
Expand description

KIP-534 log-compaction decision core.

This core comes out of krabka-log, so that Creusot can verify it. The host crate re-exports these functions, and the stateright model in krabka-log/src/compact_model.rs drives these exact functions.

Structs§

BatchMeta
Per-batch facts the retain decision needs.
RecordMeta
Per-record facts the retain decision needs.

Enums§

CompactionDecodeStep
Whether a compaction batch-stream decode is complete, made progress, or encountered corrupt input.
RetainDecision
What to do with a record during the rewrite pass.
TxnDataState
Whether the cleaner read data of a control marker’s own transaction in this pass. This is Kafka’s per-transaction rule (CleanedTransactionMetadata), not a per-producer one.

Functions§

compaction_decode_step
Classify one compaction batch-stream decode step.
compute_horizon
Compute the delete horizon timestamp: now + delete.retention.ms, saturated at the i64 bounds.
retain_decision
The single per-record KIP-534 retain decision.