pub async fn capture_projection<S: BuildHasher>(
log: Arc<dyn MetadataEventLog>,
topics: &HashMap<Uuid, (String, i32), S>,
captured_at_ms: u64,
) -> Result<DisklessWalCapture, String>Expand description
Replay the committed keyed index state up to each partition’s high watermark and freeze it.
The capture only reads. Each partition’s cutoff is its high watermark
(ListOffsets LATEST) when the capture starts, and the capture reads
from the partition’s low watermark up to that cutoff. It applies each
record as it arrives rather than buffer the range, so an index larger than
memory still captures. An empty partition is complete at once. Replay
fences that brokers publish into the index are not index state, so the
capture skips them. Kafka refuses a Produce to an internal topic from any
client but __admin_client, so a capture that wrote its own fence would
fail against a Kafka-compatible broker.
§Errors
Returns an error when the index watermarks cannot be read, when the read fails, when the watermark lookups and the read together take longer than 30 seconds, or when a record cannot be decoded or projected.