pub fn aggregate_with_cancel(
lmpg: &Lmpg,
req: &AggregateRequest,
is_cancelled: &dyn Fn() -> bool,
) -> Result<(Vec<GroupBucket>, u64), QueryError>Expand description
Aggregate execution with cooperative cancellation at root and bucket
boundaries. Returns the completed buckets plus the total number of matched
roots (the total reported by the data plane, matching a search result’s
total).
§Errors
Returns QueryError::Cancelled when the probe requests a stop, and
QueryError::ResourceLimit when more than MAX_AGGREGATE_BUCKETS
distinct groups would be created. Storage/engine and predicate errors are
propagated from the underlying reads.
§Panics
Panics only if a bucket just inserted by ensure_bucket cannot be
retrieved, which is unreachable.