Expand description
The round’s probe (decision 485): one statement a tick answering, for each read a master’s
round makes, whether that read would find anything. Inside Database::in_round, a read
whose check said no returns nothing without going to the database; reads anywhere else (a
worker’s turn, the API) are never skipped.
Each check is its read’s own FROM ... WHERE text, shared through a macro defined next to
the read, so the two can’t drift apart; where a read takes a parameter the probe doesn’t
have, its check drops that condition and says yes more often, never less. A write
transaction ending anywhere in this process (counted by Database::wrote) makes the next
read whose check said no take the probe again: work a round stores for its own later parts (a
run started, then its instances, then their assignment) is found in the same round.
A read bounded by a time (tasks ready, retries due, scheduled DAGs due) passes the time it asks for: a probe covering an earlier time is taken again at that one, so work a part stored at its own, later clock is found too. The probe looks ahead by what the round gives it (the tick), so a round’s parts, a few milliseconds apart, share one probe.
Structs§
- Probe
- What a probe found: for each check, whether its read would find anything.
Enums§
- Check
- A read a round may skip, by what its check found.