Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion deploy/configs/backend-storage-routing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,14 @@ default: sketch_warm_tier
# windows).
# - The `[count, topk, rate_post_hoc]` slot routes ad-hoc / post-hoc
# queries to the cold archive. `count(http_requests_total{
# service="payments"})` is the criterion ⑤ probe — it surfaces
# zone="z0"})` is the criterion ⑤ probe — it surfaces
# `data_source: gorilla_archive` because the cold engine answers
# it. `topk(...)` and `rate(...)` shapes the warm tier doesn't
# precompute also drop into the archive's exact streaming path.
# (Predicate uses `zone="z0"` rather than `service="payments"`
# because the fake-exporter emits `zone, rack, node, pod` —
# no `service` label is produced, so the older selector always
# matched zero series and masked the cold-engine traversal.)
#
# Per-query-shape dispatch is the right axis: a single-target form
# would force ④ and ⑤ to be mutually exclusive (quantile-on-warm
Expand Down
10 changes: 9 additions & 1 deletion deploy/configs/mvp-workload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,16 @@
# backend-storage-routing.yaml so the warm tier doesn't cover
# it; the query forces routing to GorillaQueryEngine. Drives
# criterion ⑤ verification (data_source: gorilla_archive).
#
# Predicate uses `zone="z0"` because the fake-exporter emits
# `zone, rack, node, pod` labels (see `deploy/fake-exporter/main.go`
# `attrSetsZRNP`); there is NO `service` label on the produced
# series, so the previous `service="payments"` selector matched
# zero series and surfaced as an empty (but HTTP-200) cold-tier
# response. `zone="z0"` matches roughly 1/4 of the produced
# series and exercises the same routing+engine code path.
- metric_name: http_requests_total
query_string: "count(http_requests_total{service=\"payments\"})"
query_string: "count(http_requests_total{zone=\"z0\"})"
accuracy_sla: 0.0
assign_to_role: archive

Expand Down
24 changes: 18 additions & 6 deletions deploy/scripts/run_mvp_demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
# - label-at-instant (sum by zone, gateway fan-in)
# - combined (rate over 5m + sum by zone)
# plus a fourth ad-hoc cold-fallback probe
# (`http_requests_total{service="payments"}` — assigned
# (`http_requests_total{zone="z0"}` — assigned
# to role "archive").
#
# 4. Freshness phase calls `run_freshness_phase.sh` which emits
Expand Down Expand Up @@ -653,11 +653,16 @@ ad_hoc_postings_phase() {
|| log " [warn] curl exited non-zero for ${label}"
}

# The two postings-exercise queries from the spec.
# The two postings-exercise queries from the spec. Predicates
# match labels the fake-exporter actually emits (`zone, rack,
# node, pod` per `deploy/fake-exporter/main.go::attrSetsZRNP`) —
# the previous `service="api"` and `status=~"5.."` selectors
# match zero series since neither label exists in the produced
# data, masking the postings-filter exercise with empty results.
fire_query "count_api_series" \
'count(http_requests_total{service="api"})'
'count(http_requests_total{zone="z0"})'
fire_query "topk_5xx_by_zone" \
'topk(5, sum by (zone) (rate(http_requests_total{status=~"5.."}[5m])))'
'topk(5, sum by (zone) (rate(http_requests_total{rack=~"r0[0-3]"}[5m])))'

# Step 2.4: archive-only PromQL surface (Path A2 / Thanos engine).
# These queries were rejected by the legacy curated-subset
Expand Down Expand Up @@ -695,10 +700,17 @@ cold_fallback_phase() {
local adir="${PIPELINE_OUT_BASE}/ad-hoc"
local backend_url="http://localhost:${PIPELINE_QUERY_PORT}"

log " cold[payments]: count(http_requests_total{service=\"payments\"})"
# Probe predicate uses `zone="z0"` because the fake-exporter
# emits zone/rack/node/pod labels — no `service` label exists,
# so the previous `service="payments"` selector always matched
# zero series and surfaced an empty (but HTTP-200) response that
# masked any real cold-path data (deploy/fake-exporter/main.go
# `attrSetsZRNP`). Keeping the file basename `cold_payments.*`
# for backwards compatibility with mvp_report.py's loader.
log " cold[zone=z0]: count(http_requests_total{zone=\"z0\"})"
curl -sG -m 10 \
"${backend_url}/api/v1/query" \
--data-urlencode 'query=count(http_requests_total{service="payments"})' \
--data-urlencode 'query=count(http_requests_total{zone="z0"})' \
-o "${adir}/cold_payments.json" \
-w '{"http_code":%{http_code},"time_total":%{time_total}}\n' \
> "${adir}/cold_payments.curlstats" \
Expand Down