Skip to main content

Module drill

Module drill 

Source
Expand description

The disaster-recovery drill’s side of a soak: the declared load run against the source cluster until it is lost, and the read-back of the cluster restored from the capture.

krabka-soak-drill is the command-line front end. Everything it does besides parsing arguments and listening for SIGTERM is here, so the load and the read-back are exercised against a live broker by the soak_drill suite of krabka-broker.

Modules§

cli
krabka-soak-drill’s command line, and run, which carries a parsed one out. The binary only parses its arguments and listens for SIGTERM.

Structs§

Objectives
A disaster-recovery contract’s objectives and paths, in the units the drill’s shell side reads: whole milliseconds and topic shapes.
PathShape
The topic a path writes to, as the drill must create it.

Functions§

load_contract
Read and validate the contract at path, which must be a disaster_recovery contract.
objectives
The objectives and the paths of a disaster-recovery contract.
probe
krabka-soak-drill probe: write one record to topic’s partition and read it back, and describe the outcome in the line the gate checks for.
read_back_restored
Read every path of the restored cluster back, check each committing group’s restored offsets against its last commit before the boundary, and return the evidence the judge grades.
read_load
Read a load record that run_load wrote.
record_load
krabka-soak-drill load: run the load until lost, report each producer’s totals, and write the record to out.
record_readback
krabka-soak-drill readback: read the restored cluster back against the load recorded at load, report each path’s split at the boundary, and write the evidence to out.
run_load
Run the contract’s load until lost completes or the contract’s duration elapses, and record every acknowledgement and commit with its time.
write_json
Write value as JSON through a rename, so a reader never sees half a file.