Skip to main content

Module preconditions

Module preconditions 

Source
Expand description

Moving a row along, or out of, the chain of things that must be true before we submit. Decided from the database alone, so it keeps running during a Suotar outage.

Structs§

CheckStartFacts 🔒
PendingMove 🔒

Enums§

Target 🔒
What the preconditions make of one row.

Constants§

PRECONDITIONS_LIMIT
How many rows one iteration may move.

Functions§

pending_moves 🔒
The facts of the rows that may need a move, so limit cannot be spent on rows that need nothing.
precondition_move 🔒
The move each edge makes: kept out of the query so every edge’s error code, admin flag and timeline line sit in one place.
precondition_target 🔒
The one table of the pipeline’s moves that need no study registry: recovering rows a dead worker left behind, and moving a row along, or out of, the chain of preconditions. A target equal to the row’s state is staying put.
recompute_preconditions
Applies at most limit moves to the scoped rows and returns how many moved.
resume_state 🔒
Where a failed_retryable row goes when its backoff elapses, derived from how far it had got. Never submitting: only the import phase writes that, in the transaction before it sends.