Skip to content

fix(traces): partition trace_facets_hourly by day - #1116

Merged
JeremyFunk merged 1 commit into
mainfrom
fix/trace-facets-hourly-partition
Sep 28, 2026
Merged

JeremyFunk merged 1 commit into
mainfrom
fix/trace-facets-hourly-partition

fix(traces): partition trace_facets_hourly by day

f4a3472
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Sep 28, 2026 in 3m 47s

Confidence 4/5 · No issues found

Confidence 4/5 · likely safe to merge
The load-bearing constants are right (bfaed79b…f941 recomputed for v25), and the new local step only drops and rebuilds a 30-day derived rollup from its source MV.
quality 100/100 · no findings · tests covered · risk medium

Partitions trace_facets_hourly by day instead of month, so the 30-day TTL no longer outruns the partition period and tinybird deploy accepts the datasource. Adds local store step v24 -> v25 to recreate and rebuild the rollup, and bumps LOCAL_SCHEMA_VERSION to 25. Safe to merge.

  • trace_facets_hourly moves to PARTITION BY toDate(Hour)
  • Migration 0034's CREATE statements edited in place to match the emitter
  • New step local-0024-to-0025-trace-facets-hourly-daily-partition drops and rebuilds the rollup
  • LOCAL_SCHEMA_VERSION is 25 with a frozen v25 snapshot and history entry
What was checked
  • Recomputed the v25 digest: local-schema.sql and local-schema-v25.sql both normalize to bfaed79bcf2423f5…
  • New step's drops and backfill satisfy the existing IF EXISTS idempotency sweep (local-store-migrations.test.ts:584)
  • Emptied rollup rebuilds from trace_list_mv, which retains the same 30 days

f4a3472 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple to ask about one.