Skip to main content

eval_bitmap_query_bucket_iter

Function eval_bitmap_query_bucket_iter 

Source
pub fn eval_bitmap_query_bucket_iter<'a, S, F>(
    source: S,
    query: BitmapQuery,
    range: Range<u64>,
    bucket_size: u64,
    direction: ScanDirection,
    budget: u64,
    policy: SkipPolicy,
    pacing: WatermarkPacing,
    on_metrics: F,
) -> impl Iterator<Item = Result<Watermarked<(u64, RoaringBitmap)>, ScanStop>> + 'a
Expand description

Evaluate a DNF BitmapQuery as an ordered iterator of marked bucket bitmaps. Output emits Watermarked::Item((bucket_id, bitmap)) interleaved with Watermarked::Watermark(p) derived from the slowest leaf’s progress.

budget caps the bucket rows charged across all leaf scans, including dead rows drained during gap catch-up; exhaustion ends the iterator with ScanStop::ScanLimit carrying the merged frontier. on_metrics fires exactly once when the returned iterator is dropped, whether or not it was polled.

pacing decides which watermarks are emitted (see WatermarkPacing); the bucket rows it counts are the ones charged against budget.

Unlike super::eval_bitmap_query_stream, there is no budget >= unique_leaf_count misconfiguration guard: callers such as the fullnode pass a per-chunk budget that legitimately falls below the leaf count near the end of a request, and the per-leaf first-bucket reservation still lets every leaf report its first position.