Skip to content

fix(multinode): WARMUP_S=60 + grouping_labels + queries-e2e wave queries - #397

Merged
zzylol merged 1 commit into
mainfrom
fix/multinode-harness-warmup-and-quantile-shape
May 18, 2026
Merged

zzylol merged 1 commit into
mainfrom
fix/multinode-harness-warmup-and-quantile-shape

Conversation

@zzylol

@zzylol zzylol commented May 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Three harness gaps closed against the post-#396 multinode baseline (asap arm 332/413 success):

  1. WARMUP_S 30 → 60s in topology.env. The 30s warmup wasn't long enough for the agent's first 30s tumbling window to close + flush sketch state to backend before replay started. Result: ~14 leading error/200 per query on 4 queries each run.

  2. grouping_labels: [zone] added to all 8 entries in deploy/mvp-multinode/configs/asap/mvp-workload.yaml. PR fix(deploy): add grouping_labels: [zone] to mvp-workload entries (B3 end-to-end) #390 added these to the singlenode equivalent but the multinode workload was never swept. Without it, the controller's attributes/keep upstream-of-sketch processor isn't injected → agent emits full-attr sketches → backend stores per-(zone,rack,node,pod) sids → queries return per-series instead of per-zone.

  3. Replaced broken quantile by (zone) (0.99, http_requests_total_latency_ms) in queries-e2e.json with max by (zone) (quantile_over_time(0.99, http_requests_total_latency_ms[5m])). Original used PromQL's instant quantile() aggregator which expects scalar values across series — incompatible with DDSketch state on asap tier. Replacement is valid PromQL on both tiers: inner returns per-zone p99 directly on asap (thanks to fix 2's grouping_labels), per-series p99 on b0/b1 raw scan. Outer max by (zone) rolls per-series up to worst-case per-zone tail.

histogram_quantile was considered but doesn't apply — fake-exporter/main.go:446 emits a Float64Gauge, not a Prometheus histogram with _bucket{le=...} series.

Validation (full all-arms run post-fix)

Query asap b0 b1
quantile_over_time(0.99, ...[5m]) 54/54 ✅ 119/119 118/118
quantile_over_time(0.5, ...[5m]) 53/53 ✅ 119/119 118/118
sum by (zone) (http_requests_total) 53/53 ✅ 118/118 118/118
sum by (zone) (rate(...)) 53/53 ✅ 118/118 118/118
sum_over_time(...[5m]) 53/53 ✅ 118/118 118/118
topk(5, sum by (zone) (rate(...))) 53/53 ✅ 118/118 118/118
max by (zone) (quantile_over_time(...)) 0/53 ❌ see below 118/118 118/118

6/7 wave queries now 100% on asap (was 4/7 with 14-error leading pattern on the other 3 in PR #396's baseline).

Follow-up (ASAPQuery-backend, not harness debt)

max by (zone) (quantile_over_time(0.99, ...)) errors on asap tier — the engine doesn't compose outer aggregation operators on function results, even when the inner already returns per-zone (no-op identity). The same query succeeds 118/118 on b0/b1 via VictoriaMetrics. Worth a separate ASAPQuery-backend PR.

Test plan

…ries-e2e wave queries

Three harness gaps closed (against asap arm post-#396 baseline 332/413):

1. WARMUP_S 30 → 60s in `topology.env`. The 30s warmup wasn't long enough
   for the agent's first 30s tumbling window to close + flush to backend
   before replay started. Result: 14 leading "error/200" on 4 queries
   per arm.

2. `deploy/mvp-multinode/configs/asap/mvp-workload.yaml` was missing
   `grouping_labels: [zone]` on all 8 entries. ASAPCollector PR #390
   added these to the singlenode workload but the multinode equivalent
   was never swept. Without grouping_labels, the controller's
   `attributes/keep` processor isn't injected, the agent emits full-attr
   sketches, the backend stores per-(zone,rack,node,pod) sids, and
   queries return per-series instead of per-zone.

3. Replaced broken `quantile by (zone) (0.99, http_requests_total_latency_ms)`
   in `queries-e2e.json` with
   `max by (zone) (quantile_over_time(0.99, http_requests_total_latency_ms[5m]))`.
   Original used PromQL's instant `quantile()` aggregator which expects
   scalar values across series — incompatible with DDSketch state.
   The replacement is valid PromQL on both raw and sketch tiers: inner
   computes per-series p99 over 5min (or per-zone p99 directly on asap
   thanks to the new grouping_labels), outer `max by (zone)` is the
   per-zone worst-case rollup (SLO-relevant tail).
   `histogram_quantile` was considered but doesn't apply — the
   fake-exporter emits a Float64Gauge per fake-exporter/main.go:446,
   not a Prometheus histogram with `_bucket{le=...}` series.

Results post-fix on asap arm: 6/7 wave queries now 100% success
(was 4/7 with 14-error leading pattern on the other 3). Baselines b0/b1
unchanged at 100%+empty on the queries the producer emits data for.

Known follow-up (asap engine limitation, not harness debt): the new
`max by (zone) (quantile_over_time(...))` query still errors on asap
because the engine doesn't compose outer aggregation operators on
function results — even when the inner already returns per-zone (which
makes the outer a no-op identity). The same query succeeds 118/118 on
b0/b1 via VictoriaMetrics. Worth a separate ASAPQuery-backend PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zzylol
zzylol merged commit 50ef70a into main May 18, 2026
@zzylol
zzylol deleted the fix/multinode-harness-warmup-and-quantile-shape branch July 17, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant