Skip to main content

get_sync_sandbox_id

Function get_sync_sandbox_id 

Source
pub fn get_sync_sandbox_id(
    corpus_id: i32,
    sandboxes: &SandboxCache,
    backend: &mut Backend,
) -> Option<Option<i32>>
Expand description

Memoised getter for a corpus’s sandbox id, populating the shared SandboxCache from the backend on a miss (the ventilator’s DB-holding counterpart to get_sandbox_id). One lookup per corpus_id ever dispatched — bounded by the corpus count, not the task count.

Fails closed: a failed lookup is not cached and yields None (unknown), so the sink derives no result path and hands the task back to the in-flight set, where the reaper retries it (re-attempting this lookup) or dead-letters it. Memoising a failure as “ordinary” would route a sandbox’s results over the parent’s published archives for the dispatcher’s lifetime.