Skip to main content

with_deadline

Function with_deadline 

Source
async fn with_deadline<F>(state: &State, check: F) -> Result<(), Error>
where F: Future<Output = Result<(), Error>>,
Expand description

Runs check under --consistency-check-timeout.

Every check here talks to a Materialize that may have died mid-file, and both the HTTP client and persist retry internally with no deadline of their own. Without a bound the checks wait out the whole CI step, hours later, having printed nothing about which one was stuck.

The deadline is deliberately its own knob rather than a multiple of --default-timeout. A check opens the durable catalog and diffs two full dumps of it, so it costs far more than a query and scales with the size of the catalog, not with how long a single query may take. It bounds a hang, so it sits far above what a healthy check costs on a loaded agent.