Skip to content

Physical candidate labels don't say which pane chain is maintained at ingestion time; distinct plans share a label #876

Closed

Description

@milindsrivastava1997

Problem

Physical candidates that maintain different pane chains at ingestion time can get the same label. The suffix ingestion time: <family> ×<n> panes names only the family and the pane count, not the query or the pane width. When two chains have the same pane count, their plans look identical in the viewer's list, even when their costs differ by almost 2×.

Repro

On 115cd3c2, save as wl.json. The workload is quantile_over_time(0.5, data[1m]) every 10 s and quantile_over_time(0.5, data[3m]) every 30 s, so each query's panes are 6 wide: 6 × 10 s and 6 × 30 s.

{"query_workload": {"language": "promql", "query_batch": null, "repeating_queries": [
  {"query": "quantile_over_time(0.5, data[1m])", "demand": {"fixed_interval": 10000},
   "requirements": {"accuracy": {"max_error": 0.01, "failure_probability": 0.001}},
   "predictability": {"predictable": {"known_at": null}}},
  {"query": "quantile_over_time(0.5, data[3m])", "demand": {"fixed_interval": 30000},
   "requirements": {"accuracy": {"max_error": 0.01, "failure_probability": 0.001}},
   "predictability": {"predictable": {"known_at": null}}}]},
 "data_workload": {"arrival": {"ingesting": {"rows_per_second": 666.67}},
  "sources": {"data": {"series_count": 10000, "metric_type": "gauge", "sample_interval": 15000}}}}
cargo run -p asap-devtools --bin stage_pipeline -- --workload wl.json --exhaustive --max-displayed 2000 --out out.json

Observation

Four pairs of physical candidates share a label. For example, two candidates are both labelled:

Q1 DDSketch · Q2 DDSketch · DDSketch for Q1 in 6 × 10s panes, DDSketch for Q2 in 6 × 30s panes · ingestion time: DDSketch ×6 panes
Chain maintained at ingestion Cost per second
Q1's 6 × 10 s chain 10.26
Q2's 6 × 30 s chain 19.22

The KLL equivalent behaves the same way, as do both families' variants with shared Scan (Q1, Q2).

Expected

Each label should identify which chain is maintained, for example ingestion time: DDSketch for Q2, 6 × 30s panes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dag-viewerDAG export and visualization tooling

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions