You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Darling compose: CAGG routing has no rollup-availability gate — old-window custom-view panels throw 42P01 on plain-PostgreSQL stores #1665
Pre-existing sibling of the #1664 fix, shipped with the original compose read-routing (#1625-#1627).
Problem
ComposeSourceRouter.Resolve routes a custom-view panel to collect.query_stats_hourly / procedure_stats_hourly / query_store_stats_hourly (or the _daily tiers) purely by the window's age and the CAGG catalog's dimension coverage. It never checks whether the rollup exists in the store. The continuous aggregates are runtime TimescaleDB setup (TimescaleSupport.EnsureContinuousAggregatesAsync), so:
a bring-your-own plain PostgreSQL store never has them → any composed panel whose window starts more than ~3 days back compiles SQL against a missing relation and fails at run time with 42P01;
a TimescaleDB store whose failure-isolated ensure sweep only built some aggregates routes onto the missing ones the same way.
The built-in tabs got an availability gate in #1664 (TimescaleSupport.DetectRollupsAsync + RetentionTierRouter.Resolve(now, start, hourlyAvailable, dailyAvailable)); the composer still routes blind.
Why it's not a one-liner
The composer's catalog spans three tables' rollup pairs (ComposeCaggCatalog: query_stats, procedure_stats, query_store_stats), so the probe needs per-catalog-entry granularity (the #1664 probe covers only the query-grain + db-grain pairs the built-in tabs read). Availability then has to thread through the compile pipeline to wherever ComposeSourceRouter.Resolve is called, with the same degrade rules (daily missing → hourly capped; hourly missing → raw) — and on a TimescaleDB store with retention active, the raw fallback silently truncates to ~4 days, so the compiled panel should carry the same "clamped, and says so" treatment the expensive-queries panel got in #1664 rather than quietly shortening the window.
Notes
On plain PG the raw fallback is complete (no retention policies without the extension), so for that store shape raw-routing is correct, not degraded.
DarlingComposeTests gated-live coverage compiles recent windows only, which is why this never tripped CI; a live test with a >3-day window against the plain dev PG would reproduce it today.
Activity
Merge pull request #1675 from erikdarlingdata/feature/1665-compose-ro…
erikdarlingdata commentedon Jul 26, 2026
Fixed by PR #1675, merged to dev. Live on DARLING01 as of the dev@f899fe94 deploy (2026-07-26).
Merge origin/dev into feature/1759-coverage-routing-and-backfill
Merge origin/dev into feature/1759-coverage-routing-and-backfill
Merge origin/dev into feature/1759-coverage-routing-and-backfill
Compose routing: gate CAGG source selection on the rollups the store …
Compose: keep the NEWEST buckets when the row cap truncates, and say …
Route get_query_store_duration_trend through the corrected rollup (#2736