Skip to main content

Module ledger

Module ledger 

Source
Expand description

Sequence sets: the compact form every soak ledger keeps its records in.

A sustained-load run acknowledges hundreds of millions of records. Holding each one as its own entry would make the ledger the largest thing on the load host, so each producer numbers its records 0, 1, 2, ... and the ledgers store those numbers as sorted, disjoint, half-open runs. A producer that acks in order costs one run however long it runs, and a reader that sees partitions interleaved costs a run per gap until the gaps close.

Structsยง

SeqSet
A set of u64 sequence numbers, held as sorted, disjoint, half-open runs.