Skip to content

ops-catalog: materialize stats to Bigtable#2955

Open
williamhbaker wants to merge 4 commits into
masterfrom
wb/stats-next
Open

ops-catalog: materialize stats to Bigtable#2955
williamhbaker wants to merge 4 commits into
masterfrom
wb/stats-next

Conversation

@williamhbaker
Copy link
Copy Markdown
Member

@williamhbaker williamhbaker commented May 18, 2026

Description:

  • Create a minimalist Bigtable rust read client for reading catalog stats. As of these changes it's not wired up to anything, but it was developed in conjunction with prototyping various other usages of catalog stats in the code base: Data movement stalled alerts & abandoned task detection (control plane agent), OpenMetrics API, billing calculations, and speculative UI capabilities.
  • Run a Bigtable emulator locally for local stats, and materialize stats into it in parallel with the Postgres materialization. Some basic instructions are included for verifying the two databases are equivalent.
  • Add the new L2 stats derivation (now partitioned by grain) to the update_l2_reporting control plane API. This is needed for the local Bigtable stats materialization to work. Once the control plane API is deployed on this new code, it will also cause it to publish the new L2 derivation in production.

Per the above, prior to deploying the new control plane API on this code, we should create the new reporting-dedicated data plane. Then just after the control plane API is deployed, call the update_l2_reporting endpoint with the default data plane parameter set to that reporting data plane so that the new L2 derivation is created there.

Workflow steps:

(How does one use this feature, and how has it changed)

Documentation links affected:

(list any documentation links that you created, or existing ones that you've identified as needing updates, along with a brief description)

Notes for reviewers:

(anything that might help someone review this PR)

Move from its previous location in control-plane-api to the ops
crate so the upcoming Bigtable read client can share the definition.
Read side of the `catalog_stats_<grain>` tables that the new
stats-view materialization will write. Wraps the BigTable data API
behind name/range/prefix fetchers, each returning a coroutine-backed
stream.
The new catalog-stats client and its integration tests need a BigTable
endpoint; provide one via the cloud-sdk emulator wrapped in a systemd
unit and a mise task. The local control-plane agent depends on the
emulator so the dual-read path in `PGControlPlane` has somewhere to go,
and platform-test runs `local:bigtable` before nextest so the same
integration tests run in CI.
`update_l2_reporting` populates the new derivation in parallel with
the old one and stamps each L1 source with `not_before` = today so
the shadow doesn't backfill history during rollout.
@williamhbaker williamhbaker marked this pull request as ready for review May 18, 2026 18:05
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