Persist metric audit - #38664
Draft
SangJunBak wants to merge 3 commits into
Draft
Conversation
`mz_persist_shard_live_writers` and `mz_persist_shard_rewrite_part_count` appear on no dashboard. `mz_persist_shard_inline_backpressure_count` was registered together with inline writes but never incremented, so the panel that plots it has always shown zero. Every per-shard family costs one series per shard in every process that holds a handle to that shard, which is where the persist share of the environmentd /metrics payload comes from.
Six per-shard families were only ever read summed over all shards, so
the shard label bought nothing but one series per shard per process.
The three `mz_persist_backpressure_*` families keep their names and lose
their labels. They are set by the persist_source backpressure operator,
which never runs in environmentd, so there every one of those series was
a zero. The gauge among them now reads as the sum over live operator
instances, each contributing its most recent value through
`GaugeContribution` and withdrawing it on drop.
The operator's metric bundle, `BackpressureOperatorMetrics`, is shared
with the upsert operator. It now holds plain handles, and each owner
keeps its own series alive: the persist client through its process-level
`BackpressureMetrics`, upsert through the new per-worker
`UpsertBackpressureMetrics`.
The three `mz_persist_shard_pubsub_diff_*` counters move next to the
other pubsub receiver metrics as
`mz_persist_pubsub_client_receiver_diff_{applied,not_applied_stale,not_applied_out_of_order}`.
`mz_persist_shard_since`, `mz_persist_shard_upper`, `mz_persist_shard_stale_version`, `mz_persist_shard_schema_registry_version_count`, `mz_persist_shard_inline_part_bytes` and `mz_persist_shard_batch_part_version_bytes` appear on no curated dashboard, only on the everything dump. Frontiers per collection are in `mz_internal.mz_frontiers`, `mz_persist_shard_count` already counts shards, and each of the two `_bytes` families has a `_count` sibling on the shard dashboard. The release sign-off reference counted `mz_persist_shard_upper` series to get a shard count and now points at `mz_persist_shard_count`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Breakdown and explanation why we're removing what we're removing:
https://claude.ai/code/artifact/cadbde1e-53ea-4e1d-a7a1-197c799e65c9