Skip to main content

plan_query

Function plan_query 

Source
pub fn plan_query(
    cells: Vec<CellInfo>,
    nodes: Vec<NodeInfo>,
    local_node_id: &NodeId,
) -> Result<QueryPlan>
Expand description

Plan a query: decide whether to execute locally or distribute across nodes.

§Strategy

  1. If all cells fit in one bee’s memory budget and we have an idle bee, run locally
  2. Otherwise, assign cells to nodes using cache locality and capacity
  3. Apply leafcutter sizing: split assignments that exceed a bee’s budget