Skip to main content

find_process

Function find_process 

Source
pub fn find_process(
    pool: &Pool<Postgres>,
    process_id: &Uuid,
    default_audience: &str,
) -> impl Future<Output = Result<ProcessMetadata, Error>>
Expand description

Finds a process by its ID and returns it as ProcessMetadata with pre-serialized JSONB properties.

One of the read sites that resolves a row’s own audience column: default_audience is bound as $2 and resolves a never-stamped (legacy, pre-v8) process’s NULL column, so view_instance('log_entries'|'measures'|'images'|'otel_spans', <process_id>) works for such a process instead of failing in jit_update when process_metadata_from_row reads a NULL audience. Callers source it from LakehouseContext::default_audience.