Skip to main content

hydration_query

Function hydration_query 

Source
fn hydration_query(ignored: &BTreeSet<GlobalId>) -> String
Expand description

Returns a query for when a replica last finished hydrating an export.

It returns no row if the replica has reported no non-transient export. Otherwise its one row says whether the export is in ignored, which holds only when every reported export is, and its hydration time: NULL if some export not in ignored is not hydrated on some worker, else the latest time one of them hydrated.

NOTE: This must stay a fast-path peek, an index scan plus a finishing, so that it does not install a dataflow on every replica on every tick. Aggregates would make it a slow-path peek.