Skip to content

Unify PromQL instant and range query fetch/merge paths #581

Description

@milindsrivastava1997

PromQL instant queries and range queries use two independently implemented fetch/merge designs for the same underlying job, not one design expressed twice.

  • Instant: one targeted fetch per values_query (exact-window if Sliding, range if Tumbling), merged once via merge_precomputed_outputs (fold over merge_with, with a do_merge short-circuit when only one bucket is in range).
  • Range: one big contiguous fetch over the whole extended range, then a fresh WindowMerger/NaiveMerger built and fully re-merged from scratch per output step, per key. The trait's incremental slide() (add/remove) is never used.

Binary-expr instant and range queries each just run the corresponding plain-query pipeline once per arm and combine client-side, so this fork is duplicated across all four PromQL query paths, not just the two plain ones.

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