Once #608 routes Sliding-window range queries through query_precomputed_output_exact (one call per output step instead of one wide scan), a range query over N output steps issues N sequential exact-window store calls where it previously issued one scan call. Even after #607 removes the write-lock cost, that's still N separate lock-acquire-and-lookup round trips instead of one.
Proposal
Add a batched variant, e.g. query_precomputed_output_exact_batch(metric, aggregation_id, windows: &[TimestampRange]) -> Result<Vec<TimestampedBucketsMap>, _> (exact shape TBD), that acquires the store shard lock once and resolves all requested exact windows against MutableEpoch/SealedEpoch in a single pass, instead of one lock cycle per window.
Scope
Sequencing
Pure perf follow-up, no correctness bug riding on it — #608's fix is correct with sequential exact calls today. Land after #607 and #608, whenever convenient.
Related: #581, #607, #608.
Once #608 routes Sliding-window range queries through
query_precomputed_output_exact(one call per output step instead of one wide scan), a range query over N output steps issues N sequential exact-window store calls where it previously issued one scan call. Even after #607 removes the write-lock cost, that's still N separate lock-acquire-and-lookup round trips instead of one.Proposal
Add a batched variant, e.g.
query_precomputed_output_exact_batch(metric, aggregation_id, windows: &[TimestampRange]) -> Result<Vec<TimestampedBucketsMap>, _>(exact shape TBD), that acquires the store shard lock once and resolves all requested exact windows againstMutableEpoch/SealedEpochin a single pass, instead of one lock cycle per window.Scope
asap-query-engine/src/stores/traits.rs— new trait method.asap-query-engine/src/stores/simple_map_store/{per_key,global}.rs— implementation.asap-query-engine/src/engines/simple_engine/mod.rs— range pipeline's per-step Sliding fetch (from Range queries over Sliding-window aggregations use overlap-scan fetch, not exact-window fetch #608) becomes one batched call up front instead of a call inside the per-step loop.Sequencing
Pure perf follow-up, no correctness bug riding on it — #608's fix is correct with sequential exact calls today. Land after #607 and #608, whenever convenient.
Related: #581, #607, #608.