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ยง

PendingMove ๐Ÿ”’

Constantsยง

PRECONDITIONS_LIMIT
How many rows one iteration may move.

Functionsยง

pending_moves ๐Ÿ”’
Only the rows whose facts disagree with the state they are in, so limit cannot be spent on rows that need nothing.
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.
transition_for ๐Ÿ”’
The transition each edge writes: kept out of the query so every edgeโ€™s error code, admin flag and audit message sit in one place.