Skip to content

Add a batched exact-window query API to the store #609

Description

@milindsrivastava1997

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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions