Skip to main content

Module write_group_rules

Module write_group_rules 

Source
Expand description

The write-group rules. See the crate documentation for what each covers.

Each rule is an async function taking impl AsyncFn() -> F, how to make a fixture, and returning Result<RuleOutcome, Violation>, as the ingest family’s do.

§What no rule here does

Assert a local position it did not read back. Every first compared is the position the store assigned to the group’s first event, read through EventStore::read. The literal positions below are origin positions: facts a peer supplies.

Decode a payload (SY-35). Groups are told apart by their opaque bytes.

Functions§

a_group_after_a_redelivery_is_named_by_its_first_landed_row
SY-39, with SY-11: a group whose first event is a re-delivery is named by the first row it landed, and keeps its guard.
a_read_never_cuts_a_group
SY-39: a read never returns part of a group. It stops before the group that would take the page past max_events, and returns a first group whole however large it is.
an_append_reads_back_as_one_group
SY-39: one append reads back as one write group, named by the position the store gave its first event, carrying no guard.
an_ingested_group_keeps_its_boundary_and_guard
SY-39: an ingested group keeps its boundary, the origin’s identities, and the guard it arrived with.
compensation_joins_its_group
SY-39, with SY-2: a compensation is one write group with the ingested group it answers, after it.
pages_chain_on_first_and_end_with_nothing
SY-39: pages chained on after = last.first() return every group exactly once, in order, and only the read that reached the end says [Waiting::Nothing].